From: Tim T. <t....@co...> - 2004-05-13 02:12:27
|
Friedrich Lobenstock wrote: > Tim Tait wrote on 08.05.2004 21:15 MET: > >> Friedrich Lobenstock wrote: >> >>> Tim Tait wrote on 08.05.2004 19:13 MET: >>> >>>> Friedrich Lobenstock wrote: >>>> >>>>> Why don't you change the original mount and add the options >>>>> "ro,noatime" >>>>> there? >>>>> >>>>> Just tried it with my local CD-Rom drive to make sure iso9660 >>>>> accepts the >>>>> "noatime" option. >>>>> >>>>> # mount /dev/cdrom /mnt/ -o ro,noatime # mount | grep /mnt >>>>> /dev/sr0 on /mnt >>>>> type iso9660 (ro,noatime) >>>> >>>> I thought that mounting it read only from the beginning would break >>>> the live-update feature, no? >>> >>> Then your patch should also break it too, shouldn't it? >> >> No, because I remount it read-only after the update check is finished >> - ie it will have already copied bootcd.iso.new (if it exists) to >> bootcd.iso, and thus is ready to continue with the normal mount >> sequence, which only requires read access. > > Ok, were did I have my head. > >>>> Tho I suppose if is bootcd.iso.new is detected, it could be >>>> remounted rw at >>>> that time. >>> >>> Can you please test that and add the necessary remount's there? >> >> I can, though it will mean 2 remounts - one to make it rw for update, >> then another to make ro when update is done. > > The current situation is using the minimal amount of mount commands. > But for sake of cleaner implementation, meaning in the normal case we > don't need to run two mounts, I think the other way is better. > Updating is a special case anyway and were you have to take special > meassures anyway. Agreed. > How about factoring out the update stuff into another file to make the > mount_cdrom more readable again? I'll let someone else make that call, but it's beginning to seem like a better idea... > > BTW while looking at the update code I think we should also > rename/move the /mnt/DEVIL-LINUX file so we know from which version to > which we are updating. Heiko!? it make sense they should match. > >> Should the new diff be done against the original, or the last patched >> version? I don't see that change in CVS yet. > > The webinterface seems to be up to date, so you can always get the > file from there: > http://cvs.sourceforge.net/viewcvs.py/devil-linux/build/config/etc/initrd/mount_cdrom > I didn't see the changes in the "cvs diff" because by default it compares to the revision from which you modified it, not the latest. Hmm, but can I just use "cvs diff -D now -uN ./config/etc/initrd/mount_cdrom" to force a diff of my version against the latest CVS repository? Seems easier than moving mine aside, updating, renaming, and putting mine back... or going to the web to get it. And more foolproof. > > While you are at it, the "if" from before "# generate list of cdroms > from devfs" down should be moved down and merged with your addition of > "if [ "$3" != "silent" ]". Is shorter and makes the file more readable. > > And while your are using the "ro,noatime" mount option why not merge > the two for-loops into one? Like: > > for disk in $CDROMS $PARTITIONS > do That will change the function a bit, do we want that? I guess there is no harm in looking for a bootcd.iso on CDROM is there? Actually, it would make installing to disk easier to have the ISO image available on CD, as the install-on-usb script needs it. Of course for the CD to boot the PC, it would have to be made from the ISO... so the ISO would contain the ISO?... now my head hurts. I don't think that can work. Question: Can install-on-usb make a .iso file from the CD itself easily? It would solve that chicken-and-egg problem. Also, is there any way to know which is our boot device? It seems like that should be the 1st device in the scan list. Picture this: I upgrade to a bad bootcd.iso on my hard disk, so now it wont boot. So I pop in my USB stick, set it as the 1st boot device in the BIOS, the USB stick boots up... and loads the bad bootcd.iso off the hard disk... Arrggg. We have a boot line option for which config file to use, but none to say which iso. I thnk this should be added to mount_cdrom like it was done in linuxrc for the config file. Comments? Maybe I'm wrong but I think I found another problem with the auto-upgrade - we need to update the /boot/initrd.gz file as well as bootcd.iso , right? Otherwise if it was a different rev of the kernel the boot will blow up due to library mismatches, no? Tim |