2014-08-16

Slitaz -- boot kernel with initramfs

qemu-x86_64 -m 512 -kernel vmlinuz-3.2.53-slitaz
CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE="initrd.cpio"

50 cp /usr/share/boot/initrd initrd.cpio

[ -x /bin/udhcpc ] && udhcpc -b -s /init
while true; do
   busybox | sed '/Current/,$!d'
   if [ -x /bin/setsid ]; then
      setsid sh -c "exec sh <$TTY >$TTY 2>&1"
   else
      sh <$TTY >$TTY 2>&1
   fi
done

slitaz-rolling-core64.iso 2014-Aug-04 05:42:53 44.0M

1. extract vmlinuz-3.2.53-slitaz and rootfs.gz from slitaz-rolling-core64.iso
Applications --> Accessories --> ISO Master

2.
root@slitaz:/tmp# ls -l rootfs.gz vmlinuz-3.2.53-slitaz
-rw-r--r-- 1 root root 41239348 Aug 13 10:26 rootfs.gz
-rw-r--r-- 1 root root 3084016 Aug 13 10:26 vmlinuz-3.2.53-slitaz

3.
root@slitaz:/tmp# file -k vmlinuz-3.2.53-slitaz
vmlinuz-3.2.53-slitaz: x86 boot sector12- Linux kernel x86 boot executable bzImage, version 3.2.53-slitaz (root@tank) #2 SMP Wed Jul 30 14:21:12 Europe 201, RO-rootFS, swap_dev 0x2, Normal VGA MS-DOS executable, MZ for MS-DOS

4.
root@slitaz:/tmp# tazpkg -gi qemu-x86_64

root@slitaz:/tmp# qemu-x86_64 -m 512 -kernel vmlinuz-3.2.53-slitaz


  • mkdir: can't create directory 『/dev': File exists
  • udhcpc: ioctl 0x8933 failed: No such device