[syslinux] standalone bootable usb-stick

Alvin Oga aoga at mail.Linux-Consulting.com
Wed Sep 21 08:35:25 PDT 2005


hi ya kent

On Tue, 20 Sep 2005, Kent Robotti wrote:

> >- i suspect i'm missing a line in /linuxrc that is required by syslinux
> >        http://linux-boot.net/Bootable/InitRD.LinuxRC/ \
> >                LinuxRC-2005/linuxrc.cfusb
> 
> This is probably all you need in linuxrc.
> 
>         # - load vfat, fat, dos, usb-modules
>         /sbin/insmod modules
> 	# mount the usb stick
>         /bin/mount -n /dev/sda1 /mnt/sda1
>         /sbin/losetup /dev/loop0 /mnt/sda1/LoopFile
> 
> --- syslinux.cfg ---
> 
>         kernel vmlinuz
>         append initrd=initrd.gz ramdisk_size=8192 root=/dev/loop0 ro

i think you're missing a couple points:

a)  the same /linuxrc ( /dev/ram0 ) and RootFS ( /dev/loop ) works
   when booting with lilo and grub

	- ie ... /linuxrc does not need to be changed
	or does it because it doesnt work with syslinux

	- both lilo and grub does NOT need to "exec chroot /mnt/loop"
	as the last thing in /linuxrc

	- for booting with syslinux, i get 2 error message:

	timeout opening/writing control channel /dev/initctl
	and
	"kernel panic: VFS: unable to mount rootfs on 07:00"

	even if /dev/ram0 and /dev/loop0 both are listed in df
	while /linuxrc is being executed

	the /dev/initctl problem is probably because PID is swapper
	but the process list is the same for grub and lilo also
	which is able to change from /linuxrc to /sbin/init

b)  since the rootFS is in /dev/loop, i suspect your minimized 
    /linuxrc will need to do "echo 0x700 > /proc/sys/kernel/real-root-dev"


questions ..
	- what is the purpose of pivot_root ??

> >another odd thing is syslinux-3.11 ( the way i've built the usb-stick )
> >does not like the hierachy ( it can't find linux, even if i'm using
> >vmlinuz )
> >
> >        /boot/vmlinuz
> >        /boot/syslinux/syslinux.cf
> 
> It should be like this.
> 
>         /initrd.gz
>         /vmlinuz
>         /syslinux.cfg

yes... i figured out the flat-tree probelm which is why i mentioned
it that it'd be preferable to have /boot and /boot/syslinux or /syslinux
to be compatible with /boot and /boot/isolinux  or /isolinux

c ya
alvin




More information about the Syslinux mailing list