Below is the steps how to make grub udisk manually
my udisk is /dev/sdc
- clean udisk information(mbr and partition information)
sudo dd if=/dev/zero of=/dev/sdc bs=1M count=1024 oflag=direct
- create dos partition table
sudo fdisk /dev/sdc
o create a new empty DOS partition table
n -> p -> default->default->204800
a toggle a bootable flag
w write table to disk and exit
- sudo mkfs.ext4 /dev/sdc1
sudo mount /dev/sdc1 /media/wrsadmin/boot/
sudo grub-install --root-directory=/media/wrsadmin/boot/ /dev/sdc
Installing for i386-pc platform.
Installation finished. No error reported.
- vi grub.cfg, add your menuentry
menuentry ‘wrlinux-nfs-dhcp-rootfs3’ {
recordfail
load_video
gfxmode l i n u x g f x m o d e i n s m o d g z i o i f [ x linux_gfx_mode insmod gzio if [ x linuxgfxmodeinsmodgzioif[xgrub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
set root=‘hd0,msdos1’
linux /boot/bzImage rootfstype=nfs root=/dev/nfs rw nfsroot=128.224.162.154:/nfsroot/rootfs3,vers=3 ip=dhcp console=ttyUSB0,115200n8
}
5.copy bzImage to /boot/bzImage
6.set pc bios boot from udisk - about the rootfs
for arm, you can build one with busybox by yourself;
for x86, you can use yocto to build one.