persistence and custom kernel
El Friday 18 January 2008 02:23:18 Santiago Andres Triana va escriure:
> Hi Jordi (and list)
>
> I will try your instructions.
>
> My most immediate problem though is persistence. And I have some questions:
>
> 1. Is the disk (where the persistence file is written) supposed to have a
> particular label? what if it is a usb stick partition... or a NFS
> filesystem?
Persistence is for the home directory or even the whole filesystem,
The whole filesystem persistence is very slow because all the changes are
written to disk, don't recommend it.
Home persistence does work, and performs very well, even better than disk
installed OSs, because only the user documents and settings are written to
disk, the rest is done in RAM memory.
In an unmodified live system has the label 'home-rw', but we can modify
the /etc/live.conf file assigning other values. Ex.
home_persistence="santiago-rw"
if it is a USB partition that works the same, with the partition label; only
is necessary to wait for the operating system mounting the usb devices,
Modify the /etc/live.conf with:
live-media-timeout=15 (not sure if is that variable?)
mounting a persistent nfs partition is not supported directly, should modify
something for achieve that.
>
> 2. Are the labels different if the live-snapshot script is used?
I prefer do not work with live snapshots because that writes the disk at the
end of the sesssion; indeed, a home persistence works like a normal directly
attached filesystem.
>
> 3. Are you supposed to do something in particular to recover the modified
> system after a reboot or is it automatic when using live-snapshot?
>
I believe no, but i don't recommend live snapshots,
>
> I would not need the persistence feature if I had enough knowledge to
> include my own /etc/network/interfaces file and other things. I wish there
> was some documentation about this...
it's easy to include files creating an additional file of ext2 or ext3 type,
or even a simple directory.
example, create in the live-media-path a directory with any name and the
extension ".dir"
mkdir -p live/myfiles.dir
mkdir -p live/myfiles.dir/etc/network/
cp /etc/network/interfaces live/myfiles.dir/etc/network/
or create a subdirectory for the hostname and include files for the live
filesystem for that host,
debian live will search for additional filesystems in the subdirectory
corresponding to the live hostname
mkdir -p live/myhostname
cd /tmp
# the directory hostfiles will contain the filesystem structure
mkdir -p /tmp/hostfiles
mkdir -p //tmp/hostfiles/etc/network
cp /etc/network/interfaces //tmp/hostfiles/etc/network
export COUNT=$[$(du -s hostfiles | awk '{ print $1 }' )*2+1000]
echo $COUNT
# the hostfiles.et3 file will be included in the live filesystem
dd if=/dev/zero of=hostfiles.ext3 count=0 seek=$COUNT
mkfs.ext3 -F hostfiles.ext3
mkdir dir
mount -o loop hostfiles.ext3 dir
cp -a hostfiles/* dir
rm -Rf dir/lost+found
umount dir
cp hostfiles.ext3 live/myhostname
that is an idea, it's your turn to work about that,
>
> Infinite thanks!
>
> Santiago
Regards,
Jordi Pujol
Reply to: