Last active
December 19, 2015 10:29
-
-
Save probonopd/5940581 to your computer and use it in GitHub Desktop.
Debugging live-boot persistence when persistence file is located on same ext4 partition as live ISO (which is booted with GRUB2)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# I boot from an ISO that is loop-mounted with GRUB2 like this: | |
root@debian:/home/user# cat /lib/live/mount/findiso/boot/grub/grub.cfg | |
# (...) | |
menuentry "binary.hybrid.iso" { | |
insmod ext2 | |
iso_path="/boot/binary.hybrid.iso" | |
export iso_path | |
args="findiso=${iso_path} live-config.keyboard-layouts=de live-config.locales=de_DE.UTF-8 live-config.timezone=Europe/Berlin boot=live config quiet splash" | |
export args | |
loopback loop ${iso_path} | |
linux (loop)/live/vmlinuz $args | |
initrd (loop)/live/initrd.img | |
} | |
# (...) | |
# When I boot without the "persistence" boot option: | |
# ================================================== | |
root@debian:/home/user# cat /etc/*release | |
PRETTY_NAME="Debian GNU/Linux 7 (wheezy)" | |
NAME="Debian GNU/Linux" | |
VERSION_ID="7" | |
VERSION="7 (wheezy)" | |
ID=debian | |
ANSI_COLOR="1;31" | |
HOME_URL="http://www.debian.org/" | |
SUPPORT_URL="http://www.debian.org/support/" | |
BUG_REPORT_URL="http://bugs.debian.org/" | |
root@debian:/home/user# cat /lib/live/mount/medium/.disk/info | |
Debian GNU/Linux 7.0.0 "Wheezy" - Official Snapshot i386 LIVE Binary 20130705-09:20 | |
root@debian:/home/user# dpkg-query -W -f '${status} ${package} ${version}\n' | sed -n 's/^install ok installed //p' | grep live | |
live-boot 3.0.1-1 | |
live-boot-doc 3.0.1-1 | |
live-boot-initramfs-tools 3.0.1-1 | |
live-config 3.0.23-1 | |
live-config-doc 3.0.23-1 | |
live-config-sysvinit 3.0.23-1 | |
live-manual 1:3.0.2-1 | |
live-manual-epub 1:3.0.2-1 | |
live-manual-html 1:3.0.2-1 | |
live-manual-odf 1:3.0.2-1 | |
live-manual-pdf 1:3.0.2-1 | |
live-manual-txt 1:3.0.2-1 | |
live-tools 3.0.20-1 | |
# This is my persistence file. It is located in the root directory of the ext4 partition | |
root@debian:/home/user# ls /lib/live/mount/findiso/persistence | |
/lib/live/mount/findiso/persistence | |
root@debian:/home/user# mount /lib/live/mount/findiso/persistence /mnt/ -oloop,ro | |
root@debian:/home/user# cat /mnt/persistence.conf | |
/etc | |
/root/persistent | |
# During boot, I get an error | |
root@debian:/home/user# cat /var/log/live/boot.log | |
umount: can't umount /live/overlay: Device or resource busy | |
# This is what is mounted | |
root@debian:/home/user# mount | |
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime) | |
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime) | |
udev on /dev type devtmpfs (rw,relatime,size=10240k,nr_inodes=215958,mode=755) | |
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000) | |
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=350408k,mode=755) | |
/dev/sda1 on /lib/live/mount/findiso type ext4 (ro,noatime,user_xattr,barrier=1,data=ordered) | |
/dev/loop0 on /lib/live/mount/medium type iso9660 (ro,noatime) | |
/dev/loop1 on /lib/live/mount/rootfs/filesystem.squashfs type squashfs (ro,noatime) | |
tmpfs on /lib/live/mount/overlay type tmpfs (rw,relatime) | |
tmpfs on /lib/live/mount/overlay type tmpfs (rw,noatime,mode=755) | |
aufs on / type aufs (rw,relatime,si=6b210e2a,noxino) | |
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k) | |
tmpfs on /run/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=700800k) | |
# When I boot with the "persistence" boot option: | |
# ================================================== | |
root@debian:/home/user# ls /lib/live/mount/findiso/persistence | |
ls: cannot access /lib/live/mount/findiso/persistence: No such file or directory | |
root@debian:/home/user# cat /var/log/live/boot.log | |
mount: mounting /dev/sda2 on /live/persistence/sda2 failed: No such device | |
mount: mounting /dev/sda5 on /live/persistence/sda5 failed: No such device | |
mount: mounting /dev/sda on /live/persistence/sda failed: No such device | |
mount: mounting /dev/sr0 on /live/persistence/sr0 failed: No such device | |
cp: can't create directory '/live/persistence/loop2/etc': Read-only file system | |
mount: mounting /live/persistence/loop2/etc on /root/etc failed: No such file or directory | |
mkdir: can't create directory '/live/persistence/loop2/root': Read-only file system | |
cp: can't create directory '/live/persistence/loop2/root/persistent': No such file or directory | |
mount: mounting /live/persistence/loop2/root/persistent on /root/root/persistent failed: No such file or directory | |
umount: can't umount /live/overlay: Device or resource busy | |
root@debian:/home/user# mount | |
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime) | |
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime) | |
udev on /dev type devtmpfs (rw,relatime,size=10240k,nr_inodes=215958,mode=755) | |
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000) | |
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=350408k,mode=755) | |
/dev/sda1 on /lib/live/mount/persistence/sda1 type ext4 (ro,noatime,user_xattr,barrier=1,data=ordered) | |
/dev/loop0 on /lib/live/mount/medium type iso9660 (ro,noatime) | |
/dev/loop1 on /lib/live/mount/rootfs/filesystem.squashfs type squashfs (ro,noatime) | |
tmpfs on /lib/live/mount/overlay type tmpfs (rw,relatime) | |
tmpfs on /lib/live/mount/overlay type tmpfs (rw,noatime,mode=755) | |
aufs on / type aufs (rw,relatime,si=c3e74db7,noxino) | |
/dev/loop2 on /lib/live/mount/persistence/loop2 type ext4 (ro,noatime,user_xattr,barrier=1,data=ordered) | |
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k) | |
tmpfs on /run/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=700800k) | |
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,nosuid,nodev,noexec,relatime) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment