Stuff that has not yet gone into the official build.
Post a reply

Re: Alternative usb installation method, part 2

Sun Nov 17, 2013 3:40 pm

One more:
Code:
exit_dialog () {

   $DIALOG --question --title="$TITLE error" --window-icon=error  \
   --${BUTTON0}="Continue"${BUTTON0NUM} --${BUTTON1}="Exit"${BUTTON1NUM} \
   --text="Error detected:  $error_message
\nSee $error_log for details. Press \"Continue\" to proceed anyway"

   if [[ $? -eq 0 ]] ; then
      cleanup
      run_task
   else
      cleanup
      exit 1
   fi
}

Re: Alternative usb installation method, part 2

Sun Nov 17, 2013 3:58 pm

another one more... From the partition_gui function in mkpersist, around line 79. The username and chown are so the cleanup function, which runs as unprivileged user, can delete tempfile2 in the (new) cleanup function.
Code:
   persist_dev=$(echo $selection | tr -d \|)
   persist_label=$(/sbin/blkid -c /dev/null -s LABEL "$persist_dev" | awk -F"\"" '{ print $2 }')
   if [[ -f "$tempfile2" ]] ; then
      rm "$tempfile2"
   fi

   if  [[ $persist_label = persistence ]] ; then
      unset persist_label
   fi

   if [[ -n "$persist_label" ]] ; then
      echo "$persist_label" > "$tempfile2"
      username=$(cat /tmp/r2u_user)
      chown "$username" "$tempfile2"
   fi

Re: Alternative usb installation method, part 2

Sun Nov 17, 2013 4:14 pm

That last bit is going to change again, I think. The way it is, if the label is "persistence" then the use_label function in r2u won't add an entry to the boot menu. I could partially solve this by putting an entry in the default menu, but not everyone is going to choose the option to use the default syslinux folder. That's especially true of someone who's using this utility with another distro - they'll probably use the menu that came with the live CD.

Instead, I'll make it so that if the label is "persistence" the script will append a boot entry for standard persistence, and if the label is something else, the label will be used.

Re: Alternative usb installation method, part 2

Sun Nov 17, 2013 6:34 pm

thwak, I don't know saline nor puppy. Many distros (including otherwise Debian-based ones) don't use Debian live-boot. Already available in Debian to achieve selectable configuration choices:

live-hooks
persistence files support
persistence-path=PATH
persistence-label=LABEL
persistence-read-only
persistence.conf
syslinux.cfg

New script to make loopback file.. persistence or not, luks or not (might help with r2u): http://exegnulinux.net/refracta/experim ... oopback.sh

RE live-boot in sid: You need to look in experimental or snapshot.debian.org for newer versions, they're not getting into sid just yet. Bugs will range from missing docs to total non-fuctionality.

4.0~a7-1 was a good one but too early for luks file support (without patch), I don't know after that except luks got fixed and will probably make jessie.

The lukshome hook served it's purpose at the time but is probably redundant now.

Re: Alternative usb installation method, part 2

Sun Nov 17, 2013 8:52 pm

Yeah, that one works. And it'll help. Thanks.

Re: Alternative usb installation method, part 2

Sun Nov 17, 2013 11:13 pm

One other thing I forgot: there is little point demanding r2u (gui) is called only from a terminal. However some kind of staus window is needed especially for the squash copy, which takes a little time. My preference would be an xterm window (although there are other ways e.g. zenity/yad progress)

Re: Alternative usb installation method, part 2

Mon Nov 18, 2013 3:05 pm

For now, I'm going to leave the terminal in. I like having it.

Parts can be added or removed easily, so this thing can change as live-boot catches up.

Re: Alternative usb installation method, part 2

Fri Nov 22, 2013 1:48 am

In case y'all are bored now that the installer is working, here's a deb for refracta2usb. It might have bugs, since I just had to go through and change a bunch of paths from local directory to system directories.
New features include -

Create persistent partition with standard or custom label, create persistent loopback file with standard or custom label, create multiboot usb, install alternate bootloader (install-mbr), do something from the live system that you couldn't do before (sorry, I don't remember what it was, but you can do it now.)

http://distro.ibiblio.org/refracta/file ... -0.9.4.deb

Re: Alternative usb installation method, part 2

Fri Nov 22, 2013 3:17 am

Missed one. In refracta2usb line 795:
Code:
      ./patch-initrd-gui -d


should be:
Code:
      /usr/bin/patch-initrd-gui
(add the -d for debug mode)


Edit: BTW, that was the thing you can now do from live session - patch the initrd. And I just changed it again - now, when you select the initrd that you want to patch, the script remembers where you got it, and it copies the custom initrd back to that place, instead of always putting it in /media/sdX1/live. So you can patch the initrd on your multiple live systems. (You still need to edit the menu yourself on that one.)

Re: Alternative usb installation method, part 2

Fri Nov 22, 2013 12:48 pm

Code:
/usr/bin/refracta2usb: line 21: /var/log/refracta2usb_error.log: Permission denied

Code:
/usr/bin/patch-initrd-gui: line 8: /var/log/errors-patch-initrd: Permission denied

Most of this stuff runs as normal user ( a good idea, where you don't actually need root) so log needs to go somewhere user-writable, e.g $HOME/refracta2usb_error.log

Line 795 fix works.. will test more later.
Post a reply