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

- fsmithred
- Posts: 2101
- Joined: Wed Mar 09, 2011 9:13 pm

## Re: Alternative usb installation method, part 2

Mon Jan 27, 2014 6:59 pm

http://distro.ibiblio.org/refracta/file ... 0.9.4v.deb
Edit (comment/uncomment) live_tarball in refracta2usb.conf to switch to the newer live.tar.gz.
fsmithred

- fsmithred
- Posts: 2101
- Joined: Wed Mar 09, 2011 9:13 pm

## Re: Alternative usb installation method, part 2

Wed Jan 29, 2014 5:06 pm

In 9.0.4v, patch-initrd-gui is not making the menu entry correctly when running in a live session. I think I fixed it here:
https://gist.github.com/fsmithred/8692224
Here's the section that's changed.
This

Code:
  `cd "$initrd_work_dir"
  device=$(cat /tmp/r2u_device)
  echo "device is $device"
  echo "1 /media/${device##*/}1/live"
  if $(grep -q "/lib/live/mount/medium" /proc/mounts) ; then
  live_session="yes"
  fi
  if [[ $live_session != "yes" ]] ; then
  if ! $(grep -q ${device}1 /proc/mounts) ; then
  pmount ${device}1
  fi
  source_dir="/media/${device##*/}1/live/"
  sleep 2
  else
  source_dir="/lib/live/mount/medium/live/"
  fi
  # This gives $local_path, but still need to calculate $target_dir.
  # No, it works fine with just $local_path.
  usb_mountpoint="/media/${device##*/}1"
  image_source_dir="$usb_mountpoint"
  # image_source_dir="${usb_mountpoint}/${target_name}"
  select_kernel
  # full path to file
  source_initrd=$($DIALOG --file-selection --height=550 --width=650 --title="$TITLE" \
  --text="Select the initrd to patch. It will be copied to $initrd_work_dir where it will be patched." \
  --filename="$source_dir" ${OKBUTTON} ${QUITBUTTON})
  if [[ $? -ne 0 ]] ; then
  cleanup
  exit 0
  fi`

Was changed to this

Code:
  `cd "$initrd_work_dir"
  device=$(cat /tmp/r2u_device)
  echo "device is $device"
  if $(grep -q "/lib/live/mount/medium" /proc/mounts) ; then
  live_session="yes"
  fi
  if ! $(grep -q ${device}1 /proc/mounts) ; then
  pmount ${device}1
  sleep 2
  source_dir="/media/${device##*/}1/"
  usb_mountpoint="/media/${device##*/}1"
  image_source_dir="$usb_mountpoint"
  else
  source_dir="/lib/live/mount/medium"
  image_source_dir="/lib/live/mount/medium"
  fi
  select_kernel
  # full path to file
  source_initrd=$($DIALOG --file-selection --height=550 --width=650 --title="$TITLE" \
  --text="Select the initrd to patch. It will be copied to $initrd_work_dir where it will be patched." \
  --filename="${source_dir}/*" ${OKBUTTON} ${QUITBUTTON})
  if [[ $? -ne 0 ]] ; then
  cleanup
  exit 0
  fi`

fsmithred

- fsmithred
- Posts: 2101
- Joined: Wed Mar 09, 2011 9:13 pm

## Re: Alternative usb installation method, part 2

Wed Jan 29, 2014 10:38 pm

One more big change I'm thinking of adding sooner rather than later is to add code for making an encrypted partition in mkpersist. It would require a patch initrd, and I could get rid of mkusbcrypt. I already tested the new patched initrd with squeeze and an encrypted partition that I created manually, and it worked.
dzz, you got an opinion on that?
dzz

- dzz
- Posts: 647
- Joined: Wed Apr 27, 2011 11:53 am
- Location: Devon, England

## Re: Alternative usb installation method, part 2

Thu Jan 30, 2014 2:40 am

A "removable" drive is just that.. easily lost or stolen. For larger removables an encrypted persistence partition makes better sense than a file.
It depends how much more you want to add to the script (=more complexity and work to maintain) Other thing is, more stuff that requires root, with abuse potential.
I thought current "release" live-boot already supported luks persistence partitions (just not files). If that's right there should be no need for initrd patching. All the patch does is fix a few bugs and allow RW mount till official "release" versions catch up (which can be a long wait!)
BTW I got the latest live-boot_4.0~alpha18 (in experimental now) running quite nicely but the current RW patch needed some changes.
fsmithred

- fsmithred
- Posts: 2101
- Joined: Wed Mar 09, 2011 9:13 pm

## Re: Alternative usb installation method, part 2

Thu Jan 30, 2014 2:45 pm

I tried it with refracta/wheezy, and it doesn't use the encrypted persistent partition with the stock initrd, even though it asks for the password at boot. Works fine with either the old or the new patched initrd.
dzz

- dzz
- Posts: 647
- Joined: Wed Apr 27, 2011 11:53 am
- Location: Devon, England

## Re: Alternative usb installation method, part 2

Thu Jan 30, 2014 3:13 pm

Not difficult to see why grml, siduction, antix and others use custom live-boot. These fixes seem to take forever to even make Sid.
fsmithred

- fsmithred
- Posts: 2101
- Joined: Wed Mar 09, 2011 9:13 pm

## Re: Alternative usb installation method, part 2

Thu Jan 30, 2014 11:50 pm

Did some more testing from a live session today, and I discovered something else that you can't do. Attempting to run multiboot or boot-iso and put the new system on the same drive you're running from fails - check_device checks to see if it's mounted and then exits the program. I might change the exit to a warning. As long as you're running with rw media, it should work.
fsmithred

- fsmithred
- Posts: 2101
- Joined: Wed Mar 09, 2011 9:13 pm

## Re: Alternative usb installation method, part 2

Mon Feb 10, 2014 2:39 pm

There's a problem with the graphical password entry - the logfile gets spammed with the plain-text password. This does not happen when the password is entered from a terminal. I'm playing around with redirecting the output of the commands, but I'm not having any success.
dzz

- dzz
- Posts: 647
- Joined: Wed Apr 27, 2011 11:53 am
- Location: Devon, England

## Re: Alternative usb installation method, part 2

Mon Feb 10, 2014 4:58 pm

I had that problem with the exegnu installer, which uses a plain text box for root and user passwords. Just turn off logging temporarily or replace (sed) the offending text in the log with "****" preferably soon after it happens.
fsmithred

- fsmithred
- Posts: 2101
- Joined: Wed Mar 09, 2011 9:13 pm

## Re: Alternative usb installation method, part 2

Tue Feb 11, 2014 2:57 pm

This took care of it.

Code:
  `exec 2>/dev/null
  (Do password stuff...)
  exec 2>>"$error_log"`

Post a reply
Jump to:

Powered by phpBB © phpBB Group.

phpBB Mobile / SEO by Artodia.