DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm trying to create an image I can put onto a flash drive that has /home mounted read only from an image in the flash drive root. I'm making a liveCD for a game, and would like an easy to modify/update the settings in /home/user/.wine without using live-build.
But the fist step is simple persistence.
As per instructions http://live.debian.net/manual/stable...al.en.html#544
dd if=/dev/null of=config/includes.binary/persistence bs=1 count=0 seek=1G #putting it at config/includes.binary/ means that it's at the root of the image at the end.
/sbin/mkfs.ext4 -F config/includes.binary/persistence
sudo mount -t ext4 config/includes.binary/persistence /mnt/c
sudo echo "/home union" >> /mnt/c/persistence.conf #I don't actually want the union option, but the instructions have it, and it's not working so I'm following instructions exactly
sudo umount /mnt/c
sudo lb clean
sudo lb build
Once it's finished, on windows(Can actually run a VM, unlike laptop) qemu-system-i386.exe E:\live\binary.img
It boots, check mounts with df, nothing about /home or persistence.
Many thanks for any help, been at this specific issue for about a day, with no progress. Doesn't help that live-build takes so long.
In addition, I don't know if you can include the persistence file in the live binary filesystem itself, as it will be mounted read-only at boot time. I'm not 100% sure if that would prevent it from working, however. Fix the label first, then try again, see if that's enough/
Hint: You don't need to rebuild the live image to test out if the label will work.
Unfortunately you cannot (easily) mount the image to modify it. You need to know the offset to the FAT to do so.
Once you mount it, run:
Code:
tune2fs -L persistence /path/to/persistence
and try to boot the image.
Edit:
from man 7 live-boot:
Code:
persistence-label=LABEL
live-boot will use the name "LABEL" instead of "persistence" when
searching for persistent storage. LABEL can be any valid filename,
partition label, or GPT name.
Use blkid to get the filesystem label of the persistence file you created, and then add the above to the bootloader command line (select the entry in syslinux, press [TAB] and add it to the end of the line). See if it works the way you want.
In addition, I don't know if you can include the persistence file in the live binary filesystem itself, as it will be mounted read-only at boot time. I'm not 100% sure if that would prevent it from working, however.
This makes some sense, but shouldn't it still try to mount it? Also, I'm fine with it being read only, as the final plan is this is a file I can configure once, and copy to a few different flash drives with the liveOS on it, so I can change the configurations in /home/user without rebuilding the live image.
Also, if it matters, I'm using qemu on linux now, left the country for a study abroad, leaving nicer desktop behind.
This may be a stupid question, but, do you pass persistence to the bootloader at boot time? (Been there, knocked my head against the wall, then discovered I didn't).
From that page,
"The volume label for overlays must be persistence but it will be ignored unless it contains in its root a file named persistence.conf which is used to fully customize the volume's persistence, this is to say, specifying the directories that you want to save in your persistence volume after a reboot. See The persistence.conf file for more details. "
However, their example for creating an image file doesn't include setting a label, so, your guess is as good as mine. Setting the label does not hurt, however.
Quote:
This makes some sense, but shouldn't it still try to mount it? Also, I'm fine with it being read only, as the final plan is this is a file I can configure once, and copy to a few different flash drives with the liveOS on it, so I can change the configurations in /home/user without rebuilding the live image.
Also, if it matters, I'm using qemu on linux now, left the country for a study abroad, leaving nicer desktop behind.
I've never tried mounting an RW filesystem from inside a read-only one, so I'm not sure.
The other thing I have to investigate is if live-boot checks the live medium itself for persistence files, and my guess at the moment is no. The documentation says it checks the root of all partitions for the file, but makes no mention of exclusions or inclusions of certain media. At the moment I don't have the live-boot scripts available, I will have to check later.
This may be a stupid question, but, do you pass persistence to the bootloader at boot time? (Been there, knocked my head against the wall, then discovered I didn't).
Yeah, I am.
Code:
--bootappend-live "boot=live config persistence"
I have tried actually putting this onto a USB drive, and making a persistent partition, and it worked.
Quote:
Setting the label does not hurt, however.
Oh yes, but it didn't help, but whatever. Keeping the modified persistence file for further tests.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.