0

I want to create a bootable Debian Live OS with overlay partition (i.e. save changes on it). But I want to create multiple partitions, not one. I want to install syslinux to one partition, Debian OS-live Image files to another partition, and finally overlay partition to other one. To achieve this, I read official Debian pages for help description of preparing USB for boot of Debian OS and syslinux documents. I used syslinux commands and I managed to get boot menu and I could load vmlinuz-5.10.0-8-amd64 image since I copied it into the same folder with syslinux in sdb1(boot partition, i.e. /mnt/sdb1/syslinux/vmlinuz-5.10.0-8-amd64). But I could not load initrd.img file which is located in sdb2(second partition i.e. /mnt/sdb2/live/initrd.img-5.10.0-8-amd64) with this command in menu.cfg in syslinux folder in sdb1. What I did is here in menu.cfg file which is under /dev/sdb1/syslinux/ folder :

  INCLUDE stdmenu.cfg
  MENU title Main Menu
  DEFAULT Debian GNU/Linux 64 bit
  LABEL Debian GNU/Linux 64 bit
     SAY "Booting Debian GNU/Linux Live (kernel 5.10.0-8-amd64)..."
     LINUX vmlinuz-5.10.0-8-amd64
     APPEND root=/dev/sdb2 fromhd=/dev/sdb initrd=/dev/sdb2/live/initrd.img-5.10.0-8-amd64 boot=live swap=true persistence persistence-storage=filesystem persistence-media=removable-usb union=overlay components locales=tr_TR.UTF-8 splash

Result is :

enter image description here

The command root=/dev/sdb2 and initrd=/dev/sdb2/live/initrd.img-5.10.0-8-amd64 does not work, it gives ** No such file or directory ** error. Please help, why didn't it work? How can I make it work?

1 Answer 1

0

When you use APPEND, you are just adding parameters to the kernel command line. But with modern kernels, it would be the bootloader's job to load the initrd.img file, not the kernel's. Both GRUB and SYSLINUX use the initrd command for this purpose.

For historical reasons, Syslinux understands the initrd= option on the APPEND line and handles it specially. All the other options on the APPEND line are just handed over to the kernel (and initrd scripts) for processing.

But Syslinux has no clue on how Linux will be naming the various devices when it boots up, and it seems to me Syslinux has no way (no documented way, at least) to refer to any other device than the one it's currently booting from.

The Loading vmlinuz-5.10.0-8-amd64... ok message is printed by Syslinux, just like the next line. Having the initrd file in a different partition than the kernel file means Syslinux won't be able to access the initrd file at all. Syslinux needs its configuration, the kernel, and the initrd file to all be in the same partition.

A modern version of GRUB would be flexible enough to do what you want, but such a custom installation of GRUB will take some doing.

You must log in to answer this question.