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

Bug#512661: live-initramfs: Change the path for persistent files.

Package: live-initramfs
Version: 1.154.3-1
Severity: wishlist

It would be nice to be able to specify the path where to find the 
persistent files just like it's possible to specify the path for the 
live media. Currently the persistent file must be in the root of a 
mounted device. In my setup I share a single USB key between multiple
bootable images. The images are organized in subfolders, hence all files
of a live CD (ie: live USB) are moved to a sub-folder.

I have added the boot option 'persistent-path' to specify the path of 
the persistent files. See patch in attachment.

BTW: the '.disk' folder location could also be moved to a non static 


-- Package-specific info:

-- System Information:
Debian Release: 4.0
  APT prefers stable
  APT policy: (990, 'stable'), (500, 'testing')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-6-686
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ANSI_X3.4-1968) (ignored: LC_ALL set to C)

Versions of packages live-initramfs depends on:
ii  busybox                      1:1.1.3-4   Tiny utilities for small and embed
ii  file                         4.17-5etch3 Determines file type using "magic"
ii  initramfs-tools              0.85i       tools for generating an initramfs
ii  sudo                         1.6.8p12-4  Provide limited super user privile
ii  udev                         0.105-4     /dev/ and hotplug management daemo
ii  user-setup                   1.11etch1   Set up initial user and password

Versions of packages live-initramfs recommends:
ii  eject                         2.1.4-3    ejects CDs and operates CD-Changer
pn  uuid-runtime                  <none>     (no description available)
ii  wget                          1.10.2-2   retrieves files from the web

-- no debconf information
--- scripts/live.orig	2009-01-22 17:13:01.359375000 +0100
+++ scripts/live	2009-01-22 17:19:37.828125000 +0100
@@ -340,6 +340,11 @@
 				export PERSISTENT
+			persistent-path=*)
+				PERSISTENT_PATH="${ARGUMENT#persistent-path=}"
+				;;
 				export NOPERSISTENT
--- scripts/live-helpers.orig	2009-01-22 17:02:33.281250000 +0100
+++ scripts/live-helpers	2009-01-22 17:17:58.125000000 +0100
@@ -299,6 +299,13 @@
+	if [ -z "${PERSISTENT_PATH}" ]
+	then
+		pers_fpath=${cow_backing}/${pers_label}
+	else
+		pers_fpath=${cow_backing}/${PERSISTENT_PATH}/${pers_label}
+	fi
 	for sysblock in $(echo /sys/block/* | tr ' ' '\n' | grep -v loop | grep -v ram | grep -v fd)
 		for dev in $(subdevices "${sysblock}")
@@ -332,9 +339,9 @@
-					if [ -f "${cow_backing}/${pers_label}" ]
+					if [ -f "${pers_fpath}" ]
-						echo $(setup_loop "${cow_backing}/${pers_label}" "loop" "/sys/block/loop*")
+						echo $(setup_loop "${pers_fpath}" "loop" "/sys/block/loop*")
 						return 0
 						umount ${cow_backing}

Reply to: