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

- nadir
- Posts: 1160
- Joined: Wed Mar 09, 2011 4:18 am
- Location: here

## Re: Alternative usb installation method, part 2

Mon Nov 25, 2013 2:58 am

Problems i ran into:
user must be part of plugdev to run pmount
gksu is not installed, should it be a dependency ?
dosfstools to let gparted create fat32 partitions - dependency`recommendation ?
nadir

- nadir
- Posts: 1160
- Joined: Wed Mar 09, 2011 4:18 am
- Location: here

## Re: Alternative usb installation method, part 2

Mon Nov 25, 2013 3:28 am

> Error detected:
> You did not select a CD image file.

> /usr/bin/refracta2usb: line 27: /var/log/refracta2usb_error.log: Permission denied
> …

fsmithred

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

## Re: Alternative usb installation method, part 2

Mon Nov 25, 2013 3:41 am

Done and done. Error logs are all in $HOME now. gksu is dep (should maybe that be gksu|gksudo?)
refracta2usb-9.0.4d.deb
http://distro.ibiblio.org/refracta/files/Testing/
Thanks.
nadir

- nadir
- Posts: 1160
- Joined: Wed Mar 09, 2011 4:18 am
- Location: here

## Re: Alternative usb installation method, part 2

Mon Nov 25, 2013 4:58 am

Sorry for my question:
But how would i choose a CD image to put it on a USB ?
I run "refractasnapshot" and then choose the according entry ( to usb from CD image).
That is the correct way?
Or do i need to do more?
I did that in the chroot of mine (to avoid installing third party). It failed, but that is no problem (i probably missed something you to on a real installation).
That is the reason why i realized some dependencies are missing (on a default installation they should be already there, i assume).
I then did it on real hardware, and ran in the last problem (it tells me i got to choose an image).
(running in a chroot is a good way to check for missing dependencies. Or: that is the only reason i use pbuilder, perhaps there are other usages for it, but i only use it for said purpose).
Sorry, i can't be of big help with the general problem. live on USB is already weird, with persistence has never been my thing (makes lots of sense these days, where sticks can easily have the size of 8, 16 or more Gigs ...).
dzz

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

## Re: Alternative usb installation method, part 2

Mon Nov 25, 2013 9:52 am

(/usr/bin/refracta2usb .. line 809)

Code:
  `gksu 'x-terminal-emulator --title=mkloopback -H -e /usr/bin/mkloopback.sh -debug'`

"-H" only works for xfce4-terminal (two valid alternatives for x-terminal-emulator):

Code:
  `:~$ konsole -H
  konsole: Unknown option '-H'
  :~$ xterm -H
  xterm: bad command line option "-H"`

xterm uses "-hold", konsole "--noclose". Others might be different. I used xterm for this stuff before because it's lightweight and more "universal" (not DE-specific)
Dependencies: need to add dosfstools (gparted can't handle FAT without it and it's not a gparted dep) Gksudo is done by gksu.
A simple preinst script could (optionally) add user(s) to plugdev
nadir, there is no problem here choosing an image, a filebrowser window opens.
It's wrong to assume dependencies are there, they might not be. There is no such thing as a "default installation". Deps must be listed properly in a deb package control file.
fsmithred

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

## Re: Alternative usb installation method, part 2

Mon Nov 25, 2013 11:20 am

@nadir: yeah, you could choose a snapshot you made, or you could choose an iso file you downloaded. I assume that's what you're asking.
@dzz: Been wondering about that -H. I didn't remove the dep for xterm, so I guess I'll change all the x-terminal-emulators back. Other choice would be to figure out what terminal people are using, like I did with the editor. I'll pass on that.
dosfstools is recommended in the latest version. It's listed along with cryptsetup and mbr. With a new thumb drive, you already have a fat32 partition, so you don't absolutely need to create one. Maybe I'll change it to a dependency; maybe I'll wait to hear some screaming first.
I can add a test for membership in plugdev group along with a choice to be added to it.
Other thoughts:
I don't know if I like having a common config file. Every script reads all the variables, whether they use them or not. Another way to do it would be to have a refracta2usb folder in etc/ and put all the different config files there. Also thinking about doing that in the home directory for error logs and maybe for the patch-initrd directory.
Speaking of patch-initrd directory, tell me if the way they get numbered is weird or confusing. The latest one created always has no number, and the older ones get numbered sequentially. No-number is newest, highest number is next newest, lowest number is oldest.
Edit boot menu will become a function, and you'll automatically get sent there any time you do something that generates a boot menu entry. last night I did some task (patch an initrd, I think) and I got a window that said "Task complete" and I almost exited before I remembered to edit the menu. (You have to select Edit menu for the boot text to get echoed into the boot menu from a temp file.)
fsmithred

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

## Re: Alternative usb installation method, part 2

Wed Dec 04, 2013 3:38 am

Next one:
http://distro.ibiblio.org/refracta/file ... 0.9.4e.deb
I think it all works. Probably needs some tweaking. Code is messy in places, but I had to fight with it to get it to work.

Code:
  `* Added test and warning for plugdev group memebership.
  * mkloopback is fully functional - make a persistent loopfile on
  * any partition, with or without encryption.
  * Replaced x-terminal-emulator with xterm.
  * Added mount/umount scripts to use with other loopfiles.
  * (i.e. loopfiles other than the one you're using for persistence)
  * Added test for cryptsetup in mkloopback and mkusbcrypt.
  * Preserve syslinux folder on update is now default setting.
  * Moved dosfstools up to Depends and mtools down to Recommends.
  * edit_boot_menu tests for a live session and whether the running
  * system was the one selected, for file-selection window.
  `

dzz

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

## Re: Alternative usb installation method, part 2

Thu Dec 05, 2013 1:11 am

> I think it all works

Tested here so far.. all done from latest r2u, running Wheezy main OS (built on original Refracta):
2GB pen partitioned, labelled and formatted with one FAT, one EXT2
Syslinux (re-)loaded
Custom sid iso loaded
Original refracta iso loaded in a separate directory
Patched initrd for both
Persistence files done for both in Part2 (one LUKS, for the original Refracta, in a designated directory)
Booted the Refracta. LUKS persist is working, can see it in the mounts.
I'm extremely impressed with how you got the menus to set automatically like that, this is really good. I didn't need to edit manually. No other app out there does this job better, some functions not at all.. well done fsr.
I would normally prefer a single partition on a pen that small but this is a test. Only just enough space to do this.
More later, motorway madness here (and there) for a few days.
fsmithred

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

## Re: Alternative usb installation method, part 2

Thu Dec 05, 2013 6:26 pm

The last tests I did before uploading the deb were all from a live session. Everything seemed to be working correctly, operating either on the usb with the running system or on a second usb drive. What I did not test was how it acts if you try to create a loopfile on the first (running) partition without a patched initrd. I might need to add a check_exit in there someplace.
fsmithred

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

## Re: Alternative usb installation method, part 2

Mon Dec 09, 2013 3:31 am

Here's a description of a way to use refracta2usb for which it was not intended.
If you wanted to make a loopback file on a hard drive, not to be used for persistence, but maybe as an encrypted container, you can do it with refracta2usb. Open the program, then create a file, /tmp/r2u_device, that contains the device name. For example:

Code:
  `echo /dev/sda > /tmp/r2u_device`

Go to Advanced menu, select Create Loopback File, un-check the box for persistence, select encryption if you want, select the size and the filesystem type if you want to change them. Answer 'yes' when asked about changing ownership of the filesystem.
When you're done creating the file, go to Mount Loop in the advanced menu, mount the loopback file you just made, and you can then add files. When you're done, go to Unmount Loop in the advanced menu and unmount the loopback file. You'll be asked if you want to unmount the partition that holds the loopback file. Saying 'yes' here probably won't hurt anything if you chose a partition that was already mounted before you started (like your root partition), but I did not try it (yet). If you just quit without unmounting the partition, you'll end up with a couple of leftover files and a directory in /tmp. If you're using a partition that's not normally mounted, go ahead and unmount it.
Edit: Oh wait, your version won't do all of that yet. I lose track of all the changes, but I'm pretty sure you'd only need to chown the filesystem to your user to use it.
Edit2: Well, don't bother with Mount/Unmount Loop. If you have your desktop set to show removable drives, the volume will show up on your desktop. Just click on it.
Post a reply
Jump to:

Powered by phpBB © phpBB Group.

phpBB Mobile / SEO by Artodia.