Welcome
Welcome to refracta

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. In addition, registered members also see less advertisements. Registration is fast, simple, and absolutely free, so please, join our community today!

Alternative usb installation method, part 2

Stuff that has not yet gone into the official build.

Re: Alternative usb installation method, part 2

Postby dzz » Fri Jan 03, 2014 12:25 pm

RE findiso: Tried adding a custom initrd, then a persistence file in the same directory as the rest (/sid). All good except the automatic menu additions:

Code: Select all
label sid
   menu label sid
    kernel /sid/vmlinuz quiet
    append initrd=/sid/initrd.img boot=live ip=frommedia union=aufs findiso=/sid/snapshot140102_1452.iso

label initrd.custom.img
   menu label Refracta (initrd.custom.img)
    kernel /sdc1/live/vmlinuz quiet
    append initrd=/sdc1/live/initrd.custom.img boot=live ip=frommedia union=aufs config=openssh-server basemountmode=rw,noatime,umask=000 live-media-path=/sdc1/live

label persistence
   menu label Refracta (persistence)
    kernel /sdc1/live/vmlinuz quiet
    append initrd=/sdc1/live/initrd.custom.img boot=live ip=frommedia union=aufs config=openssh-server basemountmode=rw,noatime,umask=000 live-media-path=/sdc1/live persistence persistence-media=removable-usb persistence-path=/sid/ persistence-encryption=none,luks


Should be (tested and working like this):

Code: Select all
label sid
   menu label sid
    kernel /sid/vmlinuz quiet
    append initrd=/sid/initrd.img boot=live ip=frommedia union=aufs findiso=/sid/snapshot140102_1452.iso

label initrd.custom.img
   menu label sid (initrd.custom.img)
    kernel /sid/vmlinuz quiet
    append initrd=/sid/initrd.custom.img boot=live ip=frommedia union=aufs config=openssh-server basemountmode=rw,noatime,umask=000 findiso=/sid/snapshot140102_1452.iso

label persistence
   menu label sid (persistence)
    kernel /sid/vmlinuz quiet
    append initrd=/sid/live/initrd.custom.img boot=live ip=frommedia union=aufs config=openssh-server basemountmode=rw,noatime,umask=000 findiso=/sid/snapshot140102_1452.iso persistence persistence-media=removable-usb persistence-path=/sid/ persistence-encryption=none,luks


Not a problem here as the menu editor opens and I know what to change, however most users probably don't.

Unfortunately the more options that are automated the more complex the script becomes (1284 lines). Automatic menu editing was found here the most difficult in the past because there are so many possibilities in live-boot beyond the default /live/filesystem.squashfs

Users who need more advanced options must expect that some things have to be done manually. There are limits to what an automated script can do, the rest is down to good documentation with examples.

Advanced options aside, I found nothing wrong yet in the main menu. That matters most.
dzz
 
Posts: 647
Joined: Wed Apr 27, 2011 11:53 am
Location: Devon, England

Re: Alternative usb installation method, part 2

Postby fsmithred » Fri Jan 03, 2014 2:12 pm

In retracing your steps, I see the problem. When you create a multiboot usb, you end up with a live folder inside the named folder that contains the additional system. When you use findiso, you don't get a live folder inside the named folder, so all the manipulations with the path don't work right. Can't tell you right now if this one will be fixed or not. Oh, maybe an easy fix would be to arrange the findiso option such that it puts all the files in name/live (sid/live in your case) and then the menu entry should work out the same as the other options.

Edit2: That still won't solve the problem of the missing findiso option in the second and third menu entries.

Edit: line 749 of refracta2usb is incorrect. The editor should automatically open syslinux/live.cfg if it exists, otherwise, you get to choose the boot menu file. The .test needs to be removed from the filename below.
Code: Select all
   if [[ -f "${usb_mountpoint}"/syslinux/live.cfg.test ]] ; then
As it is now, you always have to choose the boot menu.
User avatar
fsmithred
 
Posts: 2101
Joined: Wed Mar 09, 2011 9:13 pm

Re: Alternative usb installation method, part 2

Postby fsmithred » Fri Jan 03, 2014 2:49 pm

Easy fix...

Add this to the end of function setup_findiso (around line 920)
Code: Select all
   finished_message="$isofile_name was copied to $target_name,
and the boot menu entry should be correct.

If you add a patched initrd or loopback file to $target_name, the menu
entries created at that time will be incorrect, and you will need to
manually edit them to point to $target_name. See Help for more info.
"
   finished_dialog
User avatar
fsmithred
 
Posts: 2101
Joined: Wed Mar 09, 2011 9:13 pm

Re: Alternative usb installation method, part 2

Postby dzz » Fri Jan 03, 2014 11:25 pm

Tried again after deleting persistence file, custom initrd and moving the rest to /sid/live/

Menus for both initrd.custom.img and persistence are now correct, except:

Code: Select all
live-media-path=/sid/live

needs to be

Code: Select all
findiso=/sid/live/snapshot140102_1452.iso

With findiso, live-media-path is irrelevant and findiso=/path/to/whatever.iso *must* be specified

A /live subdir, containing either the squash or iso, seems the most convenient way to suit R2U as that's the usual live-image structure (although not a requirement of live-boot)

At some stage I would like to see how r2u handles other "distros" which might have a different iso structure or live-boot mechanism.
dzz
 
Posts: 647
Joined: Wed Apr 27, 2011 11:53 am
Location: Devon, England

Re: Alternative usb installation method, part 2

Postby dzz » Sat Jan 04, 2014 9:18 pm

Got antix and siduction loaded and booting so far, using R2U. Both do things differently from debian-live, using /boot/isolinux and non-standard live-boot.

Just needed to paste their isolinux.cfg menu contents into the R2U's default live.cfg

Chaining to their gfxboot stuff is a bit more tricky.
dzz
 
Posts: 647
Joined: Wed Apr 27, 2011 11:53 am
Location: Devon, England

Re: Alternative usb installation method, part 2

Postby fsmithred » Sun Jan 05, 2014 12:21 am

Looks like it works! Added iso file, patched initrd, gave it an encrypted persistent loopfile in the first partition. Menus are all correct. Didn't have to change many lines of code.

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


Code: Select all
label sid1209
   menu label sid1209
    kernel /sid1209/live/vmlinuz quiet
    append initrd=/sid1209/live/initrd.img boot=live ip=frommedia union=aufs findiso=/sid1209/live/sid-refracted-20131209_0010.iso

label initrd.custom.img
   menu label Refracta (initrd.custom.img)
    kernel /sid1209/live/vmlinuz quiet
    append initrd=/sid1209/live/initrd.custom.img boot=live ip=frommedia union=aufs config=openssh-server basemountmode=rw,noatime,umask=000 findiso=/sid1209/live/sid-refracted-20131209_0010.iso

label sidloop2
   menu label Refracta (sidloop2)
    kernel /sid1209/live/vmlinuz quiet
    append initrd=/sid1209/live/initrd.custom.img boot=live ip=frommedia union=aufs config=openssh-server basemountmode=rw,noatime,umask=000 findiso=/sid1209/live/sid-refracted-20131209_0010.iso persistence persistence-media=removable-usb persistence-path=/sid1209/ persistence-label=sidloop2 persistence-encryption=none,luks



Code: Select all
refracta2usb (0.9.4t) unstable; urgency=low

  * (refracta2usb)
  * setup_findiso() changes: kernel, initrd. isofile get copied to
  * ${target_dir}/live so menus in mkloopback and patch-initrd-gui work.
  * isolinux gets copied to ${target_dir} so isolinux2syslinux and
  * syslinux tests will still work.
  *
  * (mkloopback)
  * setup_boot_menu() changes: test for isofile, get filename,
  * use ${live_path_opt} for findiso.
  *
  *(patch-initrd-gui)
  * added ${live_path_opt} to menu text; use for live-media-path or findiso



refracta2usb (0.9.4s) unstable; urgency=low

  * default boot menu opens without having to select it.
  * setup_findiso finished message: if you add patched initrd
  * or loopback file to same directory, menu entries will be wrong.
  * setup_findiso now unmounts isofile before exits.
  * cleanup1 moved from mkloopback to functions_r2u for select-loop-mount
  * select-loop-mount now mounts partition under /tmp instead of /media
 
User avatar
fsmithred
 
Posts: 2101
Joined: Wed Mar 09, 2011 9:13 pm

Re: Alternative usb installation method, part 2

Postby fsmithred » Sun Jan 05, 2014 1:08 pm

It doesn't work with mint-cinnamon (ubuntu-based). I tried replacing 'live' with 'casper' and 'initrd.img' with 'initrd.lz' in the menu entry, tried with findiso and with unpacking the iso, and tried the original menu entry from the iso, and it won't boot. It gets stuck looking for /dev/sr0. I don't know a way around that.
User avatar
fsmithred
 
Posts: 2101
Joined: Wed Mar 09, 2011 9:13 pm

Re: Alternative usb installation method, part 2

Postby fsmithred » Sun Jan 05, 2014 1:57 pm

Right now, you get to select kernel and initrd for setup_findiso(), but for patch-initrd-gui and mkloopback, you only get to select the initrd. I think kernel selection should be added to those scripts, in case it's called something other than vmlinuz.

Also, ${target_dir}/live could be replaced with $local_path, which would include ${target_dir}/casper if it's present, and it might also work if you have the iso in ${target_dir} instead of ${target_dir}/live. Sample code:
Code: Select all
kernel_image=$($DIALOG --file-selection --width=640 --height=640 --title="Select kernel image" --text="Select the kernel image file. (default: /live/vmlinuz)" --filename="${image_mountpoint}/*" ${OKBUTTON} ${QUITBUTTON})
kernel_name="${kernel_image##*/}"
kernel_path="${kernel_image%/*}"
local_path="$(echo "$kernel_path" | sed "s:$image_mountpoint::")


Then a menu entry would include:
Code: Select all
kernel ${local_path}/${kernel_name}
and it could be the same in the different scripts, and I could probably pull out the kernel and initrd selection as a common function and put it in the functions file.

Not sure if I'm going to attempt this right away. If everything is working, I don't want to mess with it too much. If we can figure out how to boot casper, then the above will be needed.
User avatar
fsmithred
 
Posts: 2101
Joined: Wed Mar 09, 2011 9:13 pm

Re: Alternative usb installation method, part 2

Postby dzz » Sun Jan 05, 2014 2:29 pm

It gets stuck looking for /dev/sr0

Is there an alternative initrd on the iso? Debian installer on usb does that if you don't use the "hd-media" initrd (that's not so well documented)

However I know almost nothing about Ubuntu/Casper.
dzz
 
Posts: 647
Joined: Wed Apr 27, 2011 11:53 am
Location: Devon, England

Re: Alternative usb installation method, part 2

Postby fsmithred » Sun Jan 05, 2014 5:06 pm

No other initrd found in the iso. I don't know if hd-media exists for it somewhere else. I did look at the usb utility that comes with it, and I think it just copies the isohybrid to the stick, but I'm not sure. It's written in python. I'll try another debian-based distro.
User avatar
fsmithred
 
Posts: 2101
Joined: Wed Mar 09, 2011 9:13 pm

PreviousNext

Return to Experimental

Who is online

Users browsing this forum: No registered users and 0 guests

suspicion-preferred