The problem as I view it, lies in specifying a
directory rather than a drive ( /mnt/.. or /media..
instead of /dev/sdb.. or /dev/sdc.. ).
If, for instance, /dev/sdb1 is in fact mounted to
/media/disk all is fine. If the path exists and is not
a mountpoint ( /dev/sd... not
mounted to it ), then extlinux will set the system
disk as base for the directory. ( i.e. /media/disk =
/dev/sda4 in my setup ), at this
point no user acknowledgment is required, but BR
modified and extlinux.sys written to /media/disk.
TODO: run a few tests with hpa's extlinux to verify.
DONE: ./extlinux -i /media will in fact write to
/dev/sda4 if /dev/sdb1 is not mounted here.
Attached find a patch to /extlinux/extlinux.c which
gets along without expecting a special directory for
mounting the device to be made bootable.
The idea is, that the root directory "/" will always
be on the system disk, so I just added a pass to find
the "devname" belonging to "/" then
proceeding as normal. If the devnames for "/" and the
target directory match, extlinux aborts indicating
this fact.
The programming isn't very beautiful and might need
some honing, but basically it works. So if, for what
reason ever, a device is not mounted at
the path given extlinux will now exit rather than
writing over the system disks boot sector.
Casual
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
directory rather than a drive ( /mnt/.. or /media..
instead of /dev/sdb.. or /dev/sdc.. ).
If, for instance, /dev/sdb1 is in fact mounted to
/media/disk all is fine. If the path exists and is not
a mountpoint ( /dev/sd... not
mounted to it ), then extlinux will set the system
disk as base for the directory. ( i.e. /media/disk =
/dev/sda4 in my setup ), at this
point no user acknowledgment is required, but BR
modified and extlinux.sys written to /media/disk.
TODO: run a few tests with hpa's extlinux to verify.
DONE: ./extlinux -i /media will in fact write to
/dev/sda4 if /dev/sdb1 is not mounted here.
Attached find a patch to /extlinux/extlinux.c which
gets along without expecting a special directory for
mounting the device to be made bootable.
The idea is, that the root directory "/" will always
be on the system disk, so I just added a pass to find
the "devname" belonging to "/" then
proceeding as normal. If the devnames for "/" and the
target directory match, extlinux aborts indicating
this fact.
The programming isn't very beautiful and might need
some honing, but basically it works. So if, for what
reason ever, a device is not mounted at
the path given extlinux will now exit rather than
writing over the system disks boot sector.
Casual
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ