Author Topic: LiveUSB/LiveHDD Shutdown Error  (Read 4928 times)

Offline AS

  • Hero Member
  • *****
  • Posts: 4098
  • Have a nice ... night!
Re: LiveUSB/LiveHDD Shutdown Error
« Reply #45 on: May 09, 2011, 04:48:39 PM »
another source of info: http://www.linux-live.org/

Offline Was_Just19

  • Hero Member
  • *****
  • Posts: 6849
  • MLU
Re: LiveUSB/LiveHDD Shutdown Error
« Reply #46 on: May 12, 2011, 03:04:46 AM »
Yes the unclean unmount of the partition when using LiveUSB has been one of those things that has worried me for quite a while.

So using aufs will not change anything at present, but *should* allow changes to be made, that are not presently possible with unionfs, to eliminate the unclean unmounts of both partition and changes (if persistence is used).

Do I understand correctly?

I will later today (maybe tonight) look to creating a new ISO here using aufs and then try it out on LiveUSB.

regards.

Yes, you understood correctly.

What I'm trying to do right now, is to modify a little the /etc/init.d/halt script, to be able to log what is going on. Already seen that the script halt.local
is effectively executed only from a liveCD session, and is never executed from liveHDD or liveUSB installations.

AS


It is my impression that when the boot option  fromusb  is used then the shutdown script changes from that used by LiveCD.
This was the only reason I used that boot code when testing LiveHDD.
It is not ideal I guess, as the loading of the drivers etc is also changed by that boot option, as I recall.

A separate 'runlive' boot option might be worth considering.

So, just maybe the majority of the changes to be implemented could be contained in the alternate halt files?

Offline AS

  • Hero Member
  • *****
  • Posts: 4098
  • Have a nice ... night!
Re: LiveUSB/LiveHDD Shutdown Error
« Reply #47 on: May 12, 2011, 05:18:28 AM »
the flag fromusb is actually used only in linuxrc (see /usr/share/mylivecd/linuxrc), and only add the disk partitions (dev/sdXn) to the list of possible source deviced for booting the system.

Later, if a device (as opposite of partition) can be mounted, CDROM is assumed, else a partition is assumed, in the latter case the script /initrd/sbin/halt.local is deleted from the live system.

At time of shutdown, the standard /etc/init.d/halt is executed, it check for existence of /initrd/sbin/halt.local, and if it exists then it is executed, but as I wrote before it's already been deleted in the case of liveUSB/liveHDD.

At this point we can insert a new check in the standard /etc/init.d/halt for a new halt.local script (say /sbin/halt.live_system), customized for stopping the liveUSB/liveHDD systems.

However, I have already made some test, trying to manually simulate this supposed halt.live_system, from my tests I was not able to manually umount the unionfs components, because the partitions are in use.

The approach of others live systems, is a little different, because at start of the layered fs, some script execute a chroot to the new rootfs (unionfs /), I think that in this way, when the chroot process terminate, implicitely any use of the uniofs will terminate, therefore allowing for an easy unmounting... need to verify about this "story".

AS

Offline Was_Just19

  • Hero Member
  • *****
  • Posts: 6849
  • MLU
Re: LiveUSB/LiveHDD Shutdown Error
« Reply #48 on: May 12, 2011, 06:56:28 AM »
I can only say .....  without the bootcode  fromusb  the shutdown process will hang on a LiveUSB or a LiveHDD .....  maybe there is a check for the boot code to determine the shutdown/reboot sequence? I had thought it caused a different shutdown file to be used.

I am not sure if it is the same now, but previously using that boot code (IIRC) caused the USB drivers to be loaded as a priority, before the others.