Package: grub-pc Version: 1.99-12 Severity: normal Hello,
I'm writing a script to install Debian automatically on a memory card. During the install, the memory card is in a USB card reader connected to a PC, typically the device for the card is /dev/sdb and the system partition is on /dev/sdb1. Once the system is installed, the idea is to put the card in anotehr machine and to boot on it. At boot time, though, the device corresponding to the memory card will be /dev/hda and the system partition will thus be on /dev/hda1. (it is not possible to perform the installation with the card in the computer where it will be booted later for some reasons too long to explain here). Anyway: it is in this context that I tried to use some preseeding to automate grub's installation. Ideally I'd like to be able to do the preseeding in a way that allows the package's postinst script to install grub correctly. As a fallback, it would be okay that the postinst script does not install grub on the MBR and that this is done by a command executed by my script after the package has been installed. So far, though, nothing worked and I have the problem that although I preseed some settings before the package is installed, questions are still asked to the user interactively, which is precisely the behaviour I'd like to avoid. For the preseeding I tried things like: grub-pc grub-pc/install_devices multiselect grub-pc grub-pc/install_devices seen true grub-pc grub-pc/install_devices_empty boolean true grub-pc grub-pc/install_devices_empty seen true grub-pc grub-pc/mixed_legacy_and_grub2 boolean false grub-pc grub-pc/mixed_legacy_and_grub2 seen true But that does not work, the questions are still asked as if nothing had been preseeded. I also tried: grub-pc grub-pc/install_devices multiselect /dev/sdb but the results are not more satisfactory: postinst still goes interactive. So, any advice would be greatly appreciated. I'm reporting this as a bug because I find it very strange that the preseeding seems to be ignored and the questions seem to be asked in an unconditional way. Any help greatly appreciated. Thanks. PS: there is also the problem that update-grub includes options to bot on the systems present on the host OS but these will not be present on the real machine so any advice on how to cleanly proceed so that these alternatives are not included would also be greatly appreciated. -- Package-specific info: *********************** BEGIN /proc/mounts /dev/disk/by-uuid/80d90ea6-7c6e-4b6d-b1cf-1a37df95ccce / ext3 rw,relatime,errors=remount-ro,commit=5,barrier=0,data=ordered 0 0 /dev/sdb1 /mnt ext3 rw,relatime,errors=continue,user_xattr,acl,barrier=0,data=ordered 0 0 *********************** END /proc/mounts *********************** BEGIN /boot/grub/device.map (hd0) /dev/disk/by-id/ata-FUJITSU_MHZ2160BJ_FFS_G2_K83CT8A26DFU *********************** END /boot/grub/device.map *********************** BEGIN /boot/grub/grub.cfg # # DO NOT EDIT THIS FILE # # It is automatically generated by grub-mkconfig using templates # from /etc/grub.d and settings from /etc/default/grub # ### BEGIN /etc/grub.d/00_header ### if [ -s $prefix/grubenv ]; then load_env fi set default="0" if [ "${prev_saved_entry}" ]; then set saved_entry="${prev_saved_entry}" save_env saved_entry set prev_saved_entry= save_env prev_saved_entry set boot_once=true fi function savedefault { if [ -z "${boot_once}" ]; then saved_entry="${chosen}" save_env saved_entry fi } function load_video { insmod vbe insmod vga insmod video_bochs insmod video_cirrus } insmod part_msdos insmod ext2 set root='(hd0,msdos4)' search --no-floppy --fs-uuid --set=root 80d90ea6-7c6e-4b6d-b1cf-1a37df95ccce if loadfont /usr/share/grub/unicode.pf2 ; then set gfxmode=640x480 load_video insmod gfxterm insmod part_msdos insmod ext2 set root='(hd0,msdos4)' search --no-floppy --fs-uuid --set=root 80d90ea6-7c6e-4b6d-b1cf-1a37df95ccce set locale_dir=($root)/boot/grub/locale set lang=fr_FR insmod gettext fi terminal_output gfxterm set timeout=5 ### END /etc/grub.d/00_header ### ### BEGIN /etc/grub.d/05_debian_theme ### insmod part_msdos insmod ext2 set root='(hd0,msdos4)' search --no-floppy --fs-uuid --set=root 80d90ea6-7c6e-4b6d-b1cf-1a37df95ccce insmod png if background_image /usr/share/images/desktop-base/spacefun-grub.png; then set color_normal=light-gray/black set color_highlight=white/black else set menu_color_normal=cyan/blue set menu_color_highlight=white/blue fi ### END /etc/grub.d/05_debian_theme ### ### BEGIN /etc/grub.d/10_linux ### menuentry 'Debian GNU/Linux, avec Linux 3.0.0-2-amd64' --class debian --class gnu-linux --class gnu --class os { insmod gzio insmod part_msdos insmod ext2 set root='(hd0,msdos4)' search --no-floppy --fs-uuid --set=root 80d90ea6-7c6e-4b6d-b1cf-1a37df95ccce echo 'Chargement de Linux 3.0.0-2-amd64 ...' linux /boot/vmlinuz-3.0.0-2-amd64 root=UUID=80d90ea6-7c6e-4b6d-b1cf-1a37df95ccce ro quiet acpi_osi=Linux echo 'Chargement du disque mémoire initial ...' initrd /boot/initrd.img-3.0.0-2-amd64 } menuentry 'Debian GNU/Linux, avec Linux 3.0.0-2-amd64 (mode de dépannage)' --class debian --class gnu-linux --class gnu --class os { insmod gzio insmod part_msdos insmod ext2 set root='(hd0,msdos4)' search --no-floppy --fs-uuid --set=root 80d90ea6-7c6e-4b6d-b1cf-1a37df95ccce echo 'Chargement de Linux 3.0.0-2-amd64 ...' linux /boot/vmlinuz-3.0.0-2-amd64 root=UUID=80d90ea6-7c6e-4b6d-b1cf-1a37df95ccce ro single quiet echo 'Chargement du disque mémoire initial ...' initrd /boot/initrd.img-3.0.0-2-amd64 } menuentry 'Debian GNU/Linux, avec Linux 3.0.0-1-amd64' --class debian --class gnu-linux --class gnu --class os { insmod gzio insmod part_msdos insmod ext2 set root='(hd0,msdos4)' search --no-floppy --fs-uuid --set=root 80d90ea6-7c6e-4b6d-b1cf-1a37df95ccce echo 'Chargement de Linux 3.0.0-1-amd64 ...' linux /boot/vmlinuz-3.0.0-1-amd64 root=UUID=80d90ea6-7c6e-4b6d-b1cf-1a37df95ccce ro quiet acpi_osi=Linux echo 'Chargement du disque mémoire initial ...' initrd /boot/initrd.img-3.0.0-1-amd64 } menuentry 'Debian GNU/Linux, avec Linux 3.0.0-1-amd64 (mode de dépannage)' --class debian --class gnu-linux --class gnu --class os { insmod gzio insmod part_msdos insmod ext2 set root='(hd0,msdos4)' search --no-floppy --fs-uuid --set=root 80d90ea6-7c6e-4b6d-b1cf-1a37df95ccce echo 'Chargement de Linux 3.0.0-1-amd64 ...' linux /boot/vmlinuz-3.0.0-1-amd64 root=UUID=80d90ea6-7c6e-4b6d-b1cf-1a37df95ccce ro single quiet echo 'Chargement du disque mémoire initial ...' initrd /boot/initrd.img-3.0.0-1-amd64 } ### END /etc/grub.d/10_linux ### ### BEGIN /etc/grub.d/20_linux_xen ### ### END /etc/grub.d/20_linux_xen ### ### BEGIN /etc/grub.d/30_os-prober ### menuentry "Microsoft Windows XP Professionnel (on /dev/sda2)" --class windows --class os { insmod part_msdos insmod ntfs set root='(hd0,msdos2)' search --no-floppy --fs-uuid --set=root 26F2E230F2E203C1 drivemap -s (hd0) ${root} chainloader +1 } ### END /etc/grub.d/30_os-prober ### ### BEGIN /etc/grub.d/40_custom ### # This file provides an easy way to add custom menu entries. Simply type the # menu entries you want to add after this comment. Be careful not to change # the 'exec tail' line above. ### END /etc/grub.d/40_custom ### ### BEGIN /etc/grub.d/41_custom ### if [ -f $prefix/custom.cfg ]; then source $prefix/custom.cfg; fi ### END /etc/grub.d/41_custom ### *********************** END /boot/grub/grub.cfg *********************** BEGIN /proc/mdstat cat: /proc/mdstat: No such file or directory *********************** END /proc/mdstat *********************** BEGIN /dev/disk/by-id total 0 lrwxrwxrwx 1 root root 9 Oct 17 11:31 ata-FUJITSU_MHZ2160BJ_FFS_G2_K83CT8A26DFU -> ../../sda lrwxrwxrwx 1 root root 10 Oct 17 11:31 ata-FUJITSU_MHZ2160BJ_FFS_G2_K83CT8A26DFU-part1 -> ../../sda1 lrwxrwxrwx 1 root root 10 Oct 17 11:31 ata-FUJITSU_MHZ2160BJ_FFS_G2_K83CT8A26DFU-part2 -> ../../sda2 lrwxrwxrwx 1 root root 10 Oct 17 11:31 ata-FUJITSU_MHZ2160BJ_FFS_G2_K83CT8A26DFU-part3 -> ../../sda3 lrwxrwxrwx 1 root root 10 Oct 17 11:31 ata-FUJITSU_MHZ2160BJ_FFS_G2_K83CT8A26DFU-part4 -> ../../sda4 lrwxrwxrwx 1 root root 9 Oct 17 11:31 ata-TSSTcorp_CD-RW_DVD-ROM_TS-L463A -> ../../sr0 lrwxrwxrwx 1 root root 9 Oct 17 11:31 scsi-SATA_FUJITSU_MHZ2160_K83CT8A26DFU -> ../../sda lrwxrwxrwx 1 root root 10 Oct 17 11:31 scsi-SATA_FUJITSU_MHZ2160_K83CT8A26DFU-part1 -> ../../sda1 lrwxrwxrwx 1 root root 10 Oct 17 11:31 scsi-SATA_FUJITSU_MHZ2160_K83CT8A26DFU-part2 -> ../../sda2 lrwxrwxrwx 1 root root 10 Oct 17 11:31 scsi-SATA_FUJITSU_MHZ2160_K83CT8A26DFU-part3 -> ../../sda3 lrwxrwxrwx 1 root root 10 Oct 17 11:31 scsi-SATA_FUJITSU_MHZ2160_K83CT8A26DFU-part4 -> ../../sda4 lrwxrwxrwx 1 root root 9 Oct 17 11:46 usb-Kingston_FCR-HS219_1_113302001936-0:0 -> ../../sdb lrwxrwxrwx 1 root root 10 Oct 17 11:46 usb-Kingston_FCR-HS219_1_113302001936-0:0-part1 -> ../../sdb1 lrwxrwxrwx 1 root root 9 Oct 17 11:39 usb-Kingston_FCR-HS219_1_113302001936-0:1 -> ../../sdc lrwxrwxrwx 1 root root 9 Oct 17 11:39 usb-Kingston_FCR-HS219_1_113302001936-0:2 -> ../../sdd lrwxrwxrwx 1 root root 9 Oct 17 11:39 usb-Kingston_FCR-HS219_1_113302001936-0:3 -> ../../sde lrwxrwxrwx 1 root root 9 Oct 17 11:31 wwn-0x500000e042e45b66 -> ../../sda lrwxrwxrwx 1 root root 10 Oct 17 11:31 wwn-0x500000e042e45b66-part1 -> ../../sda1 lrwxrwxrwx 1 root root 10 Oct 17 11:31 wwn-0x500000e042e45b66-part2 -> ../../sda2 lrwxrwxrwx 1 root root 10 Oct 17 11:31 wwn-0x500000e042e45b66-part3 -> ../../sda3 lrwxrwxrwx 1 root root 10 Oct 17 11:31 wwn-0x500000e042e45b66-part4 -> ../../sda4 *********************** END /dev/disk/by-id *********************** BEGIN /dev/disk/by-uuid total 0 lrwxrwxrwx 1 root root 10 Oct 17 11:31 07D8-0A1E -> ../../sda1 lrwxrwxrwx 1 root root 10 Oct 17 11:31 26F2E230F2E203C1 -> ../../sda2 lrwxrwxrwx 1 root root 10 Oct 17 11:31 80d90ea6-7c6e-4b6d-b1cf-1a37df95ccce -> ../../sda4 lrwxrwxrwx 1 root root 10 Oct 17 11:46 bdad3ccb-b432-4667-b429-f55f6bbd8806 -> ../../sdb1 lrwxrwxrwx 1 root root 10 Oct 17 11:31 f626bb76-d216-4ea2-b7dc-3fe22ff9b3cb -> ../../sda3 *********************** END /dev/disk/by-uuid -- System Information: Debian Release: wheezy/sid APT prefers unstable APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 3.0.0-2-amd64 (SMP w/2 CPU cores) Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages grub-pc depends on: ii debconf [debconf-2.0] 1.5.41 ii grub-common 1.99-12 ii grub-pc-bin 1.99-12 ii grub2-common 1.99-12 ii ucf 3.0025+nmu2 grub-pc recommends no packages. grub-pc suggests no packages. -- debconf information excluded -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org