2014年4月19日 星期六

Linux System fast clone

RHEL 6.5 EFI fs structure
/dev/sdx1 vfat --> t(6)   /boot/efi (10MB should be okay)
/dev/sdx2 ext4 --> t(83)  /boot (50MB should be okay)
/dev/sdx3 ext4 --> t(83)  /

boot menu for EFI boot option
efibootmgr -c -d /dev/sda -p 1 -w -L "Redhat Enterprise Linux 6.5" -l '\EFI\redhat\grub.efi'


RHEL 6.5 legacy fs structure
/dev/sdx1 ext4 --> t(83)  /boot
/dev/sdx2 ext4 --> t(83)  /
grub need to be installed

fstab/grub.conf need to be updated according to the UUID of target disk

kernel option of current boot can be found at /proc/cmdline

2014年4月10日 星期四

option rom dump from Linux

http://www.coreboot.org/VGA_support

cat /proc/iomem |head -n 3|tail -n 1|(read m; m=${m/ :*}; s=${m/-*}; e=${m/*-}; dd if=/dev/mem of=vgabios.bin bs=1c skip=$[0x$s] count=$[$[0x$e]-$[0x$s]+1])

will dump the 3rd option rom.