[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Persistence file on the same partition of the live filesystem



Il 26/11/2012 14:29, chals ha scritto:
> On Sun, Nov 25, 2012 at 6:04 PM, Eugenio 'g7' Paolantonio
> <me@medesimo.eu> wrote:
>> [Please CC me, as I'm not subscribed.]
>>
> 
> Hi,
> You are cc'd ;)

Thank you :)

> 
>> Hello,
>> I'm trying to make the "new" persistence work with a Debian Sid snapshot.
>>
>> I made a "persistence" file in the root of the USB device's partition
>> which contains an ext2 filesystem. Inside, the persistence.conf file
>> contains rules to make the root persistent:
>>
>>    / union
>>
>> I have booted with the proper boot option ("persistence"), but it didn't
>> find the filesystem, thus not enabling the persistent feature.
>>
> 
> If what you call *a "persistence" file* is a properly built image
> file, persistence should work fine. Keep in mind that the
> persistence.conf file must be inside the image file, and *not* in the
> root of the partition. I guess this is the cause of your problem. I
> hope you get it: A partition, inside the partition the image file and
> inside the image file the persistence.conf file, eek!
> 
> I do not regularly use sparse files but I have tested them on several
> occasions. I usually carry an USB pendrive with three partitions. One
> for the live filesystem, the second one for persistence with a
> persistence file with the same contents as yours i.e:
> 
> chals@odd:~$ cat /media/persistence/live-persistence.conf
> / union
> 
> (Please do *not* get confused about the different name. I have
> live-persistence.conf because it is an image I built some time ago and
> the file was renamed/shortened to persistence.conf. The correct name
> is persistence.conf!!!!)
> 
> Everything works just fine for me. (The third partition has nothing to
> do with persistence, I use it to move files quickly from one place to
> the other)

Yes, I think I made everything correctly.

> 
> 
>> I have then created a new partition on the same device, and moved the
>> ext2 filesystem there.
>> The persistence now works.
>>
> 
> Good, you see how flexible and customizable the new persistence
> feature is? I love it. It is a good work thanks to the effort of the
> people working on it. Congratulations guys :)
> 

Yes indeed. It is really a good work. And if this "bug" is resolved, it
will be perfect :)

>> By looking at the code I saw this line in the find_persistence_media()
>> method in the 9900-misc-helpers.sh script:
>>
>>         local black_listed_devices="$(what_is_mounted_on /live/medium)"
>>
>> So, this is actually blacklisting the partition where the live
>> filesystem and kernel resiedes.
>>
>> With the old persistence method, everything worked well.
>>
> 
> I do not think I follow here. Correct me if I'm wrong but it is not
> possible, under normal circumstances to write on the partition where
> the live system is, because it is a read-only system. Again, correct
> me if I'm wrong, please.

I'll simplify a bit what I want to do:

I have an USB key with just one partition:

Partition
 - live/
   - filesystem.squashfs
   - vmlinuz
   - initrd.img
 - persistence -> ext2 image which contains the persistence.conf inside
 - syslinux/
   - boot loader files

Using this scheme it doesn't work because the partition where the Live
filesystem (filesystem.squashfs) is contained, is blacklisted by
live-boot (by the line I have reported).
So it does skip entirely the partition when looking for persistent images.

If using this scheme, instead:

Partition 1
 - live/
   - filesystem.squashfs
   - vmlinuz
   - initrd.img
 - syslinux/
   - boot loader files
Partition 2
 - persistence -> ext2 image which contains the persistence.conf inside

It does work, as the first partition (which contains
filesystem.squashfs) is blacklisted, but the persistence filesystem is
on the second partition, so live-boot correctly finds it.


> 
>>
>> I do not know if this is something wanted, so I'm not posting a bug report.
>> Is there a way to make live-boot find a persistence file in the same
>> partition of the live filesystem?
>>
> 
> No comment on this bug report part, it is an evaluation that only
> technical people can make. Sorry I can't be your man here. But I hope
> my experience with persistence (what I explained above) helps. I'm
> sorry if it is of no use :(
> 
> Have a nice week :)
> 

Thank you very much for the response!

Kind Regards,
Eugenio


-- 
.: Eugenio Paolantonio - Semplice Linux developer :.

http://semplice-linux.org
http://medesimo.eu

Twitter: @eugenio_g7 - Homepage: http://me.medesimo.eu


Reply to: