Chinaunix首页 | 论坛 | 博客
  • 博客访问: 16516
  • 博文数量: 2
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 52
  • 用 户 组: 普通用户
  • 注册时间: 2014-07-03 09:37
文章分类
文章存档

2014年(2)

我的朋友

分类: LINUX

2014-07-03 10:55:41

这是为了实现,使用USB安装系统是,系统自动排除USB安装盘,并选择剩下的磁盘,自动选择硬盘,自动把所有容量分成一个区,不使用交换分区。但是只能实现一个安装盘,和一个系统盘的情况下。
这一份pressed在虚拟机上跑没问题,一到物理上面去,到了自动选择硬盘,还是会弹出窗口,提示手动选择。请各位大牛帮我看看哪里出错了。

pressed.cfg如下:

点击(此处)折叠或打开

  1. # Debian squeeze server preseed file - to automate this, at boot:
  2. # install auto=true priority=critical preseed/url=http://DOMAIN.COM/path/preseed.cfg
  3. #
  4. ### Localization
  5. d-i debian-installer/language string zh_CN
  6. d-i debian-installer/country string CN
  7. d-i debian-installer/locale string zh_CN.UTF-8


  8. # Keyboard selection.
  9. d-i console-keymaps-at/keymap select us
  10. d-i keyboard-configuration/xkb-keymap select us


  11. ### Network configuration
  12. # Any hostname and domain names assigned from dhcp take precedence over
  13. # values set here. However, setting the values still prevents the questions
  14. # from being shown, even if values come from dhcp.
  15. d-i netcfg/choose_interface select auto
  16. d-i netcfg/dhcp_timeout string 60
  17. d-i netcfg/get_hostname string u-nas
  18. d-i netcfg/get_domain string u-nas


  19. # If non-free firmware is needed for the network or other hardware, you can
  20. # configure the installer to always try to load it, without prompting. Or
  21. # change to false to disable asking.
  22. d-i hw-detect/load_firmware boolean true
  23. ### Mirror settings
  24. d-i mirror/country string manual
  25. #d-i mirror/http/hostname string mirrors.163.com
  26. d-i mirror/http/hostname string ftp.tw.debian.org
  27. d-i mirror/http/directory string /debian
  28. d-i mirror/http/proxy string
  29. # Suite to install.
  30. d-i mirror/suite string squeeze
  31. ### Account setup
  32. d-i passwd/root-login boolean true
  33. d-i passwd/make-user boolean false
  34. ### create a password with `printf "r00tme" | mkpasswd -s -m md5`
  35. d-i passwd/root-password password yutech
  36. d-i passwd/root-password-again password yutech
  37. #d-i passwd/root-password-crypted password $1$ZgNbzcXq$hUR0CnHVtYAvNNNnA2.br1
  38. # To create a normal user account.[u-nas admin account]
  39. d-i passwd/user-fullname string U-NAS admin
  40. d-i passwd/username string admin
  41. # Normal user's password, either in clear text
  42. d-i passwd/user-password password password
  43. d-i passwd/user-password-again password password


  44. ### Clock and time zone setup
  45. d-i clock-setup/utc boolean true
  46. #d-i time/zone string US/Eastern
  47. d-i time/zone string Aisa/Shanghai
  48. d-i clock-setup/ntp boolean true
  49. d-i clock-setup/ntp-server string 0.debian.pool.ntp.org
  50. ### Partitioning
  51. d-i partman/early_command string \
  52.         usb_rom=$(mount |grep "iso9660"|cut -d " " -f1 |sed 's#/dev/##'|sed 's#[0-9]$##');\
  53.         sys_disk=$(ls /var/lib/partman/device/ |grep -v $usb_rom|sed 's#=#/#g');\
  54.         debconf-set partman-auto/disk $sys_disk;


  55. #d-i partman-auto/disk string /dev/sda
  56. d-i partman-auto/method string regular
  57. #d-i partman-auto/purge_lvm_from_device boolean true
  58. #d-i partman-lvm/device_remove_lvm boolean true
  59. #d-i partman-md/device_remove_md boolean true
  60. #d-i partman-lvm/confirm boolean true
  61. #d-i partman-auto/choose_recipe select atomic
  62. d-i partman-basicfilesystems/no_swap boolean false
  63. d-i partman-auto/choose_recipe select boot-root
  64. d-i partman-auto/expert_recipe string \
  65.         boot-root ::\
  66.                       2000 50 -1 ext4 \
  67.                       $primary{ } $bootable{ } \
  68.                         $linux-swap{ } method{ format } \
  69.                         detected_filesystem{ ext4 } format{ }\
  70.                       use_filesystem{ ext4 } filesystem{ ext4 } \
  71.                       mountpoint{ / } \
  72.               .
  73. # boot-root :: \
  74. # 50 60 100 ext4 \
  75. # $primary{ } \
  76. # $bootable{ } \
  77. # method{ format } \
  78. # format{ } \
  79. # use_filesystem{ } filesystem{ ext4 } \
  80. # mountpoint{ /boot } \
  81. # . \
  82. # 40 10000 1000000000 ext4 \
  83. # $primary{ } \
  84. # $bootable{ } \
  85. # method{ format } format{ } \
  86. # default_filesystem{ ext4 } \
  87. # use_filesystem{ ext4 } filesystem{ ext4 } \
  88. # mountpoint{ / } \
  89. # . \
  90. # 30 512 200% linux-swap \
  91. # $primary{ } \
  92. # method{ swap } format{ } \
  93. # .
  94. # The full recipe format is documented in the file partman-auto-recipe.txt
  95. # included in the 'debian-installer


阅读(7200) | 评论(1) | 转发(1) |
0

上一篇:没有了

下一篇:一次Linux系统被攻击的分析过程

给主人留下些什么吧!~~

leixiandeng2014-07-05 12:53:24

把上面这一段:
 ### Partitioning
d-i partman/early_command string \
        usb_rom=$(mount |grep "iso9660"|cut -d " " -f1 |sed 's#/dev/##'|sed 's#[0-9]$##');\
        sys_disk=$(ls /var/lib/partman/device/ |grep -v $usb_rom|sed 's#=#/#g');\
        debconf-set partman-auto/disk $sys_disk;

修改成:
 ### Partitioni