RHEL grub temporary

  • As root inside grub shell
[root@mg50 ~]# grub
Probing devices to guess BIOS drives. This may take a long time.
    GNU GRUB  version 0.97  (640K lower / 3072K upper memory)
 [ Minimal BASH-like line editing is supported.  For the first word, TAB
   lists possible command completions.  Anywhere else TAB lists the possible
   completions of a device/filename.]
grub> savedefault --default=3 --once 
  • Verify that the next boot is 3

[root@mg50 ~]# xxd /boot/grub/stage2 |grep 0000200 |awk '{print $8}'
  • Now reboot… autorun will execute from systemrescueCD
  • next boot will automatically load RHEL.
    The autorun file for the same is
    mkdir /mnt/sdd1
    sleep 1
    mount /dev/sdd1 /mnt/sdd1
    sleep 1
    date=$(date +%d-%m-%Y-time%H%M)
    mkdir /mnt/sdd1/$date
    sleep 1
    fsarchiver savefs -j8 -v -s 600 /mnt/sdd1/$date/sda3-root.fsa /dev/sda3
    sleep 2
    cd  /mnt/sdd1/$date/
    sleep 3
    md5sum * | tee MD5SUMS
    sleep 5
    sleep 5

    The relevant part of 
    title SysrescueCD Linux
            root (hd0,0)
            kernel /sysrcd/rescue64  subdir=sysrcd setkmap=de ar_nowait
            initrd /sysrcd/initram.igz