Linux代替ブートディスク作成

LABEL=/a            /a                  ext3    defaults        1 2
grub> root (hd1,0)
 Filesystem type is ext2fs, partition type 0x83
grub> setup (hd1) (hd1,0)
 Checking if "/boot/grub/stage1" exists... yes
 Checking if "/boot/grub/stage2" exists... yes
 Checking if "/boot/grub/e2fs_stage1_5" exists... yes
 Running "embed /boot/grub/e2fs_stage1_5 (hd1)"...  15 sectors are embedded.
succeeded
 Running "install /boot/grub/stage1 (hd1) (hd1)1+15 p (hd1,0)/boot/grub/stage2 /boot/grub/grub.conf"... succeeded
Done.
sed -e 's/(hd0,/(hd1,/g' -e 's%root=LABEL=/%root=LABEL=/a%' < /boot/grub/grub.conf > /a/boot/grub/grub.conf
sed -e 's%LABEL=/ %LABEL=/tmpa %' -e 's%LABEL=/a %LABEL=/ %' -e 's%LABEL=/tmpa %LABEL=/a %' -e 's/LABEL=SWAP-sda2/LABEL=SWAP-sdb2/'< /etc/fstab > /a/etc/fstab
  • BIOS設定の変更
    • ブートディスクシーケンス優先順位を変更する.