I'm trying to install SysLinux on a disk image as part of NodeOS automated build process, but seems SysLinux requires administrative priviledges. I suposse this is needed because `syslinux` command try to mount the disk image / device to store the needed files, that otherwise would be have been written before and this step omitted. The other half would be to write the MBR bootloader, that would not require administrator permissions at all because it would use file permissions in that case. Only missing point would be if the MBR bootloader would need to know exactly what's the disk sector where's the start of LDLINUX.SYS file, but this could also be given with a parameter if it's known in advance. So my question is: why are needed administrative permissions to install SysLinux in a disk image? Is any alternative for that, or could it be implemented? If that's not possible, what's doing SysLinux on the disk image MBR and/or content so I can be able to replicate it with a script? -- "Si quieres viajar alrededor del mundo y ser invitado a hablar en un monton de sitios diferentes, simplemente escribe un sistema operativo Unix." ? Linus Tordvals, creador del sistema operativo Linux
On Tue, Dec 20, 2016 at 7:14 AM, piranna--- via Syslinux <syslinux at zytor.com> wrote:> I'm trying to install SysLinux on a disk image as part of NodeOS > automated build process, but seems SysLinux requires administrative > priviledges. I suposse this is needed because `syslinux` command try > to mount the disk image / device to store the needed files, that > otherwise would be have been written before and this step omitted. The > other half would be to write the MBR bootloader, that would not > require administrator permissions at all because it would use file > permissions in that case. Only missing point would be if the MBR > bootloader would need to know exactly what's the disk sector where's > the start of LDLINUX.SYS file, but this could also be given with a > parameter if it's known in advance. > > So my question is: why are needed administrative permissions to > install SysLinux in a disk image? Is any alternative for that, orbios/linux/syslinux operates like that to install ldlinux.sys.> could it be implemented? If that's not possible, what's doing SysLinuxConsider bios/mtools/syslinux> on the disk image MBR and/or content so I can be able to replicate it > with a script?In addition to dropping ldlinux.sys, the installer modifies the VBR and ldlinux.sys to contain a map of the remaining sectors of ldlinux.sys (not the start). If you read the source of the installer, you'll see it's not a trivial task. The installer on Linux shouldn't be touching the MBR unless this is a non-partitioned image file and the first sector is actually the VBR. -- -Gene
>> could it be implemented? If that's not possible, what's doing SysLinux > > Consider bios/mtools/syslinuxJust what I needed, thanks! :-D I have not seen any reference to that on the wiki docs, maybe it would make sense to add a little note about it? And regarding to the extra modules (menu.c32 and so), I need to add them previously by hand, isn't it? Just to be sure... -- "Si quieres viajar alrededor del mundo y ser invitado a hablar en un monton de sitios diferentes, simplemente escribe un sistema operativo Unix." ? Linus Tordvals, creador del sistema operativo Linux
On 12/20/16 04:14, piranna--- via Syslinux wrote:> > So my question is: why are needed administrative permissions to > install SysLinux in a disk image? Is any alternative for that, or > could it be implemented? If that's not possible, what's doing SysLinux > on the disk image MBR and/or content so I can be able to replicate it > with a script? >Again, for FAT the alternative is already implemented via the mtools implementation. This is a general problem for manipulating disk images in Linux. The reason administrative permissions are needed is that Linux requires administrative permissions to mount a filesystem. If the filesystem is already mounted, *and* syslinux has permissions to read/write the underlying block device (which may be a loop device) then syslinux itself doesn't need any privileges. This might perhaps be possible to accomplish with the guestmount command, which runs the filesystem driver in a virtual machine and lets you mount it without admin privileges, using FUSE. However, syslinux may very well get confused as to where to find the disk image itself; that shouldn't be too hard to address, though. -hpa