Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 379265 - LiveDVD 11.2 persistence is not working
Summary: LiveDVD 11.2 persistence is not working
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Team Anniversary
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 378027
  Show dependency tree
 
Reported: 2011-08-15 13:37 UTC by Dmitry Zamaruev
Modified: 2011-08-20 06:29 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Boot error (Screen shot 2011-08-17 at 08.06.09.jpg,85.35 KB, image/jpeg)
2011-08-17 05:13 UTC, Dmitry Zamaruev
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Zamaruev 2011-08-15 13:37:25 UTC
LiveDVD "persistence" mode (described in isolinux/F9.msg file) is not working as expected.

Persistence partition is mounted but persistence_mb=<size> parameter is ignored. As stated in documentation: 
"Persistance mode requires atleast 42M of space. You can increase the size of the 
filesystem image created by the script with "persistence_mb=xxx" 

Example: gentoo persistence persistence_mb=100"

Adding "persistence_mb=100" will not create 100Mb image, rather default 69Mb.

The problem is that /etc/init.d/persistence script does not process parameters correctly. In start() function, there is block:

if get_bootparam "persistence_mb"; then
    case $(</proc/cmdline) in
        persistence_mb=*)
            persistence_img_mb="${cmd_line#*=}"
    esac
fi

that will never work because of this:
1. get_bootparam() function does not return success on parameters with values (i.e. it works for single params like 'nox', 'doraid', etc., but not for 'param=value'
2. If we pass get_bootparam() somehow, case() will not match our param, as it matches whole command line (and match should be written as *persistence_mb=* to trigger)
3. If we even got to size assignment - it will be empty, as 'cmd_line' variable do not defined anywhere (and even if it will be defined - it should be defined to only needed param, i.e. cmd_line="parsistence_mb=100", in other case substitution ${cmd_line#*=} will return garbage)

If we replace this part with working piece of code:

for arg in $(</proc/cmdline); do 
    case $arg in
	persistence_mb=*)
		persistence_img_mb=${arg#*=}
    esac
done

It will determine parameter an create persistence file with requested size.


PS. Default size of 69Mb is not enough either, just after start it full and persistence script complains that "No space left on device" while copying data:
# df -h
/dev/sdc2       4.7G  328M  4.4G   7% /mnt/persistence
/dev/loop2       67M   67M     0 100% /home
Comment 1 Team Anniversary gentoo-dev 2011-08-15 21:43:37 UTC
This will be fixed on next release, odd this stopped working since it was fine before. I will made the adjustments for it to work now.

likewhoa
Comment 2 Team Anniversary gentoo-dev 2011-08-17 04:23:59 UTC
there is a new image located at http://77.110.8.68/gentoo11 which implements the fix to this. Feel free to test.
Comment 3 Dmitry Zamaruev 2011-08-17 05:13:20 UTC
Created attachment 283621 [details]
Boot error
Comment 4 Dmitry Zamaruev 2011-08-17 05:15:19 UTC
Cannot even boot latest amd64-multilib-r2 ISO image, see attach.
Previous amd64-multilib-11.2 booted successfully on same virtual machine with same conditions.
Comment 5 Team Anniversary gentoo-dev 2011-08-17 12:04:16 UTC
please try -r2
Comment 6 Team Anniversary gentoo-dev 2011-08-17 12:06:03 UTC
just a note, i only tested the livedvd-x86-amd64-32ul-11.2.iso image.
Comment 7 Dmitry Zamaruev 2011-08-19 05:27:59 UTC
Checked latest available -r4 images (both 32ul and amd64).
- 32bit boots successfully, persistence mode working as expected, default image size is big enough
- 64bit fails to boot (in both images amd64-multilib and amd64-32ul) with same error described above

PS. It would be nice if persistence_mb parameter will be checked to be > defaul_value. Because if one will setup it lower than default size - it will be out of space and unusable.
Comment 8 Team Anniversary gentoo-dev 2011-08-19 07:04:57 UTC
(In reply to comment #7)
> Checked latest available -r4 images (both 32ul and amd64).
> - 32bit boots successfully, persistence mode working as expected, default image
> size is big enough
> - 64bit fails to boot (in both images amd64-multilib and amd64-32ul) with same
> error described above
> 
> PS. It would be nice if persistence_mb parameter will be checked to be >
> defaul_value. Because if one will setup it lower than default size - it will be
> out of space and unusable.

-r4 didn't have the aufs3 update cleanly applied so sources needed to be restored. -r5 should just work. Thanks for reporting and I have included a check on persistence_mb value so it does not fall below require space.

likewhoa
Comment 9 Dmitry Zamaruev 2011-08-20 06:29:30 UTC
(In reply to comment #8)
> -r4 didn't have the aufs3 update cleanly applied so sources needed to be
> restored. -r5 should just work. Thanks for reporting and I have included a
> check on persistence_mb value so it does not fall below require space.

Checked -r5 image - all works as expected.

Thanks! Great job.