|
From: Heiko Z. <smi...@us...> - 2004-12-31 01:52:24
|
Update of /cvsroot/devil-linux/build/scripts/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6811/scripts/scripts Modified Files: Tag: rel-1-2-patches install-on-usb Log Message: - added support for serial console to instal-on-usb script (Frank Pieczynski / Heiko) Index: install-on-usb =================================================================== RCS file: /cvsroot/devil-linux/build/scripts/scripts/install-on-usb,v retrieving revision 1.15 retrieving revision 1.15.2.1 diff -u -d -r1.15 -r1.15.2.1 --- install-on-usb 31 May 2004 14:23:21 -0000 1.15 +++ install-on-usb 31 Dec 2004 01:52:05 -0000 1.15.2.1 @@ -128,38 +128,63 @@ rm -f $device_map - cat > $TMPDIR/grub.conf <<-EOF - timeout=10 - splashimage=(hd0,$2)/boot/grub/devil-linux.xpm.gz - # Devil-Linux Boot Line options: - # DL_config=/dev/discs/disc0/part1 - loads the etc.tar.bz2 form that device - # DL_config_no_scan - prevents scanning for etc.tar.bz2 - # DL_device=/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. - title Devil-Linux - Standard VGA - root (hd0,$2) - kernel /boot/vmlinuz ro root=/dev/ram0 init=/linuxrc $RAMDISK - initrd /boot/initrd.gz - title Devil-Linux - VESA Frame Buffer 640x480 - root (hd0,$2) - kernel /boot/vmlinuz ro root=/dev/ram0 init=/linuxrc $RAMDISK vga=769 - initrd /boot/initrd.gz - title Devil-Linux - VESA Frame Buffer 800x600 - root (hd0,$2) - kernel /boot/vmlinuz ro root=/dev/ram0 init=/linuxrc $RAMDISK vga=771 - initrd /boot/initrd.gz - title Devil-Linux - VESA Frame Buffer 1024x768 - root (hd0,$2) - kernel /boot/vmlinuz ro root=/dev/ram0 init=/linuxrc $RAMDISK vga=773 - initrd /boot/initrd.gz - title Devil-Linux - Other - root (hd0,$2) - kernel /boot/vmlinuz ro root=/dev/ram0 init=/linuxrc $RAMDISK vga=ask - initrd /boot/initrd.gz - EOF + if [ "$SERIAL_CONSOLE" = "true" ]; then + + cat > $TMPDIR/grub.conf <<-EOF + timeout=10 + serial --unit=0 --speed=9600 --word=8 --parity=no --stop=1 + terminal serial + # Devil-Linux Boot Line options: + # DL_config=/dev/discs/disc0/part1 - loads the etc.tar.bz2 form that device + # DL_config_no_scan - prevents scanning for etc.tar.bz2 + # DL_device=/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. + title Devil-Linux - Serial Console + root (hd0,$2) + kernel /boot/vmlinuz ro root=/dev/ram0 init=/linuxrc $RAMDISK console=tty0 console=ttyS0,9600n8 + initrd /boot/initrd.gz + title Devil-Linux - Standard VGA + root (hd0,$2) + kernel /boot/vmlinuz ro root=/dev/ram0 init=/linuxrc $RAMDISK + initrd /boot/initrd.gz + EOF + else + cat > $TMPDIR/grub.conf <<-EOF + timeout=10 + splashimage=(hd0,$2)/boot/grub/devil-linux.xpm.gz + # Devil-Linux Boot Line options: + # DL_config=/dev/discs/disc0/part1 - loads the etc.tar.bz2 form that device + # DL_config_no_scan - prevents scanning for etc.tar.bz2 + # DL_device=/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. + title Devil-Linux - Standard VGA + root (hd0,$2) + kernel /boot/vmlinuz ro root=/dev/ram0 init=/linuxrc $RAMDISK + initrd /boot/initrd.gz + title Devil-Linux - VESA Frame Buffer 640x480 + root (hd0,$2) + kernel /boot/vmlinuz ro root=/dev/ram0 init=/linuxrc $RAMDISK vga=769 + initrd /boot/initrd.gz + title Devil-Linux - VESA Frame Buffer 800x600 + root (hd0,$2) + kernel /boot/vmlinuz ro root=/dev/ram0 init=/linuxrc $RAMDISK vga=771 + initrd /boot/initrd.gz + title Devil-Linux - VESA Frame Buffer 1024x768 + root (hd0,$2) + kernel /boot/vmlinuz ro root=/dev/ram0 init=/linuxrc $RAMDISK vga=773 + initrd /boot/initrd.gz + title Devil-Linux - Other + root (hd0,$2) + kernel /boot/vmlinuz ro root=/dev/ram0 init=/linuxrc $RAMDISK vga=ask + initrd /boot/initrd.gz + EOF + fi if [ -f "$TMPDIR/disk-mnt/boot/memtest" ]; then cat >> $TMPDIR/grub.conf <<-EOF @@ -325,9 +350,10 @@ mount -t vfat $PARTITION $TMPDIR/disk-mnt || return 1 echo "copying files" - # Warnings about not copying subdirs cause spurious eixt here so ignore status... - cp -p $TMPDIR/iso-mnt/boot/* $TMPDIR/disk-mnt/ &> /dev/null # || return 1 - cp -p $TMPDIR/iso-mnt/{DEVIL-LINUX,LICENSE} $TMPDIR/disk-mnt/ &> /dev/null || return 1 + # Warnings about not copying subdirs cause spurious eixt here so ignore status... + # also until a better solution is found, disable -p on cp to enable iso generation... + cp $TMPDIR/iso-mnt/boot/* $TMPDIR/disk-mnt/ &> /dev/null # || return 1 + cp $TMPDIR/iso-mnt/{DEVIL-LINUX,LICENSE} $TMPDIR/disk-mnt/ &> /dev/null || return 1 cat $TMPDIR/iso-mnt/isolinux.cfg | sed -e s%"/boot/"%""% > $TMPDIR/disk-mnt/syslinux.cfg || return 1 cat $TMPDIR/iso-mnt/boot/message | sed -e s%"/boot/"%""% > $TMPDIR/disk-mnt/message || return 1 copy_iso_file $DLISO $TMPDIR/disk-mnt/bootcd.iso || return 1 @@ -382,15 +408,17 @@ echo "Select which bootloader you want to use:" echo " 1) SysLinux" echo " 2) Grub" -echo " 3) Lilo" +echo " 3) Grub with serial console" +echo " 4) Lilo" ANS="" read -p "Choice: " -t 60 -n 1 -rs ANS ANS=${ANS:-1} echo $ANS [ $ANS = "1" ] && BOOTLOADER="syslinux" -[ $ANS = "2" ] && BOOTLOADER="grub" -[ $ANS = "3" ] && BOOTLOADER="lilo" +[ $ANS = "2" ] && BOOTLOADER="grub"; SERIAL_CONSOLE="" +[ $ANS = "3" ] && BOOTLOADER="grub"; SERIAL_CONSOLE="true" +[ $ANS = "4" ] && BOOTLOADER="lilo" #### Choose the format used during build for initrd.gz: echo |