From: Gerhard O. <ger...@gm...> - 2005-11-06 17:01:43
|
Two problems: The install-on-usb script seems to install grub in the first partition on hd0 (always first IDE?) instead of the selected device. (It may not be possible boot from something else than hd0, but that is adifferent issue...) The grub "root" directory where /boot/grub is located is set to (hd0,0) instead of the actual location of grub (this was the problem for me since my first partition is swap). Unless you have put the iso and boot on the first partition on the device, grub cannot find the grub directory. A few minor changes as well: Default handling a little more reasonable Merged handling of serial/normal grub console Not done: There should be separate configuration for where to put grub mbr, since it may not be on the same disk as the iso, possibly not even on the mbr. (Since DL is probably not a multipurpose computer, this is not a real life issue, included here only to let someone else investigate this). Patch and diff included. If you have this problem (or the DL team wants to minimze patches), the only thing you have to change is (normally) the following: root_drive=3D"${install_drive%%)},0)" to root_drive=3D"${install_drive%%)},$2)" Disclaimer: I have not tested this separatly -- Gerhard The sender address really contains .nospam. # diff /sbin/install-on-usb /tmp/q6/install-on-usb 120a121,122 > grub_device=3D$1 > grub_part=3D$2 131c133,138 < if [ "$SERIAL_CONSOLE" =3D "true" ]; then --- > $grub_shell --batch --device-map=3D$device_map <<-EOF > /dev/null > quit > EOF > > install_drive=3D$(grep "$grub_device\$" $device_map|cut -f1) > install_part=3D"${install_drive%%)},$grub_part)" 135,136d141 < serial --unit=3D0 --speed=3D$SERIALSPEED --word=3D8 --parity=3Dno --stop=3D1 < terminal --timeout=3D10 serial console 144a150,155 > EOF > if [ "$SERIAL_CONSOLE" =3D "true" ]; then > cat >> $TMPDIR/grub.conf <<-EOF > > serial --unit=3D0 --speed=3D$SERIALSPEED --word=3D8= --parity=3Dno --stop=3D1 > terminal --timeout=3D10 serial console 146c157 < root (hd0,$2) --- > root $install_part 149,152d159 < title Devil-Linux - Standard VGA < root (hd0,$2) < kernel /boot/vmlinuz ro root=3D/dev/ram0 init=3D/linuxrc $RAMDISK < initrd /boot/initrd.gz 155,165c162,166 < cat > $TMPDIR/grub.conf <<-EOF < timeout=3D10 < splashimage=3D(hd0,$2)/boot/grub/devil-linux.xpm.gz < # Devil-Linux Boot Line options: < # DL_config=3D/dev/discs/disc0/part1 - loads the etc.tar.bz2 form that device < # DL_config_no_scan - prevents scanning for etc.tar.bz2 < # DL_device=3D/dev/discs/disc0/part1 - Loads CD/ISO from that device < # DL_device_no_scan - Prevents scannign for CD/ISO < # < # Note: "/dev/hda1" type devices are not supported! Use /dev/discs/... or /dev/ide/... < # type device names. --- > > echo "splashimage=3D$install_part/boot/grub/devil-linux.xpm.gz" >> = $TMPDIR/grub.conf > fi > > cat >> $TMPDIR/grub.conf <<-EOF 167c168 < root (hd0,$2) --- > root $install_part 171c172 < root (hd0,$2) --- > root $install_part 175c176 < root (hd0,$2) --- > root $install_part 179c180 < root (hd0,$2) --- > root $install_part 183c184 < root (hd0,$2) --- > root $install_part 187d187 < fi 192c192 < root (hd0,$2) --- > root $install_part 206,214c206,207 < $grub_shell --batch --device-map=3D$device_map <<-EOF > /dev/null < quit < EOF < < install_drive=3D$(grep "$1\$" $device_map|cut -f1) < root_drive=3D"${install_drive%%)},0)" < < $grub_shell --batch --device-map=3D$device_map <<-EOF > /dev/null < root $root_drive --- > $grub_shell --batch --device-map=3D$device_map <<-EOF > /dev/null > root $install_part 406a400 > def=3D2 408c402 < echo "Select which bootloader you want to use:" --- > echo "Select which bootloader you want to use [$def]:" 415c409 < ANS=3D${ANS:-1} --- > ANS=3D${ANS:-$def} 423c417 < SERIALSPEED=3D"9600" --- > def=3D3 426c420 < echo "Select Baud Rate for the serial console" --- > echo "Select Baud Rate for the serial console [$def]" 436c430 < ANS=3D${ANS:-1} --- > ANS=3D${ANS:-$def} 449a444 > def=3D1 451c446 < echo "Select correct initrd.gz format used (DL default is CramFS):" --- > echo "Select correct initrd.gz format used [$def]:" 456c451 < ANS=3D${ANS:-1} --- > ANS=3D${ANS:-$def} # |