Thomas Petazzoni
2020-Apr-16 06:33 UTC
[syslinux] Installing extlinux into a disk image without being root?
Hello, Is it possible to install extlinux into a disk image, without being root ? It seems like extlinux --install absolutely requires the specific block device in which extlinux should be installed to be mounted. This prevents from doing an extlinux installation as non-root, which is annoying for build systems such as Buildroot [1] that build a complete Linux system from source, without being root, and aim at producing ready to flash disk images, also without being root. I have tried: extlinux --device disk.img --install boot/extlinux but extlinux complains: ./output/host/sbin/extlinux: path boot/extlinux/ doesn't match device disk.img Am I missing something in what options we have to install extlinux ? Thanks, Thomas -- Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
Ady
2020-Apr-16 08:02 UTC
[syslinux] Installing extlinux into a disk image without being root?
> Is it possible to install extlinux into a disk image, without being > root ? > > It seems like extlinux --install absolutely requires the specific block > device in which extlinux should be installed to be mounted. This > prevents from doing an extlinux installation as non-root, which is > annoying for build systems such as Buildroot [1] that build a complete > Linux system from source, without being root, and aim at producing > ready to flash disk images, also without being root. > > I have tried: > > extlinux --device disk.img --install boot/extlinux > > but extlinux complains: > > ./output/host/sbin/extlinux: path boot/extlinux/ doesn't match device disk.img > > Am I missing something in what options we have to install extlinux ?I think that you are misusing the options. Depending on what exactly "disk.img" actually is, you _might_ (perhaps) get to install the bootloader by means of other options. As of not using "root" privileges, there is the "syslinux-mtools" (aka "mtools/syslinux") installer, but it also depends on what exactly "disk.img" actually is. Please see the "Install" wiki page in the Syslinux wiki. Additionally, some Linux distributions have additional features incorporated in some of their "Syslinux-related" installers. Regards, Ady.
Thomas Petazzoni
2020-Apr-16 14:45 UTC
[syslinux] Installing extlinux into a disk image without being root?
Hello, Thanks for your feedback! On Thu, 16 Apr 2020 11:02:41 +0300 Ady via Syslinux <syslinux at syslinux.org> wrote:> I think that you are misusing the options. > > Depending on what exactly "disk.img" actually is, you _might_ (perhaps) get to > install the bootloader by means of other options.disk.img is a disk image, which contains a partition table, itself describing one partition, formatted ext4, with a Linux root filesystem.> As of not using "root" privileges, there is the "syslinux-mtools" (aka > "mtools/syslinux") installer, but it also depends on what exactly "disk.img" > actually is. > > Please see the "Install" wiki page in the Syslinux wiki.If I understand correctly this page, mtools/syslinux only supports FAT filesystems (which makes sense since mtools are FAT-related). And extlinux does require the filesystem to be mounted, which requires root privileges. Correct? Thomas -- Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
Reasonably Related Threads
- Installing extlinux into a disk image without being root?
- Installing extlinux into a disk image without being root?
- [RFC] make extlinux work without mount the filesystem
- [RFC] make extlinux work without mount the filesystem
- [PATCH 0/8] extlinux: support unmounted ext2/3/4 filesystem