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 fsmithred » Mon Jan 06, 2014 2:11 pm

Added "live-media-path=${target_name}/live" to refracta2usb, line 800 (setup_multiboot).

Tried antiX, both multiboot and boot_iso, but it wouldn't boot (and I had to edit the menu). System complained about invalid boot options, such as boot=live and live-media-path. Maybe anticapitalista can tell us what's going on.

Tried it with Makulu 4.1 kde, and it worked, but I had trouble getting the desktop up, because kde used all of the 50 mb persistent file I gave it.
User avatar
fsmithred
 
Posts: 1987
Joined: Wed Mar 09, 2011 9:13 pm

Re: Alternative usb installation method, part 2

Postby golinux » Mon Jan 06, 2014 3:31 pm

I really have no business posting in this thread but since I might be trying this soon maybe it's appropriate. I've spent some time with the README and noticed that in the section CREATE AN ENCRYPTED /home PARTITION the code given is:

Code: Select all
lukshome=/dev/sdb

I'm confused. Should that maybe be:

Code: Select all
lukshome=/dev/<sdX>

It's gonna take a while to wrap my head around this . . .
May the FORK be with you!
User avatar
golinux
 
Posts: 643
Joined: Thu Nov 08, 2012 1:23 am

Re: Alternative usb installation method, part 2

Postby dzz » Mon Jan 06, 2014 3:39 pm

Tried antiX, both multiboot and boot_iso, but it wouldn't boot (and I had to edit the menu). System complained about invalid boot options, such as boot=live and live-media-path. Maybe anticapitalista can tell us what's going on.

Most likely (till anti tells us) because it doesn't use standard Debian live-boot, as do not some other Debian "derivatives"

antiX booted here using the menu entry from it's own isolinux.cfg

I just loaded and booted a pclinuxos image the same way.
dzz
 
Posts: 629
Joined: Wed Apr 27, 2011 11:53 am
Location: Devon, England

Re: Alternative usb installation method, part 2

Postby fsmithred » Mon Jan 06, 2014 6:53 pm

@golinux: Neither. It should be /dev/sdb2 or /dev/sdXn, but really, you don't need to worry about that. If you want an encrypted partition, then run Add_LUKS after you run Encrypted, both from the advanced menu. It'll make the boot menu entry for you, and it will use the uuid instead of the device name, so it will work if you try to boot with it on another computer that does not have the same number of hard drives as yours.

Note that the Encrypted and Add_LUKS tasks will be removed in future versions as live-boot matures to the point of handling encrypted partitions. Also note that you can only do /home persistence that way. One more note - the readme you were reading has not been updated for the newer versions. You can read /usr/share/doc/help_r2u.txt (or select Help from either main or advanced menu) in the newer versions.

Another option is to use an encrypted loopback file. You can make the loopback file almost as big as the partition that holds it, or you could leave some unencrypted space on the partition to store files separately, or you could have several different loopback files to use with a multi-boot usb or even with a single-boot usb, if you want to have different configurations for different purposes. For encrypted loopback, you'll need to run Patch_initrd first. The program will warn you of that if you create an encrypted loopback file or if you try to put the loopback file on the first partition.

If you don't need encryption, then just run Persistent from the main menu. It will use the whole partition, and it will make the boot menu entry for you.

@dzz: I thought I tried the menu entry from the antix isolinux folder, but I guess I edited it first and did it wrong. So maybe there needs to be something to tell the user that they might want to look at the original boot menu, in case they need to copy/paste an entry into live.cfg.
User avatar
fsmithred
 
Posts: 1987
Joined: Wed Mar 09, 2011 9:13 pm

Re: Alternative usb installation method, part 2

Postby golinux » Mon Jan 06, 2014 9:46 pm

Thanks for the detailed explanation. Unfortunately, I am only grokking about half of it. Encryption isn't necessary but persistence would be. One thing I'm not clear about . . . is it possible to actually install a new program on this usb setup? Can anything be written to root or is it only capable of saving files on the 'persistent' partition. (Apologies for the stupid, baby question.)

As an alternative . . . if I install on a external harddrive how do I set up grub so that it is only in play when when booting from that usb device and the rest of the time grub on the internal disks handle a normal boot. I think this might be a more practical option for my needs.
May the FORK be with you!
User avatar
golinux
 
Posts: 643
Joined: Thu Nov 08, 2012 1:23 am

Re: Alternative usb installation method, part 2

Postby dzz » Tue Jan 07, 2014 1:31 am

Not a stupid question at all.. and you have every business to post here. Just to run this and say how you get on (or don't) is at least as valuable as lines of code.

Full persistence means you can install software and save files.. and it can run surprisingly fast from usb.

There are different ways you can organise and use persistence, just choose the one that suits you and your device best.

One of my live systems runs from a 200GB laptop HD salvaged from the bin, in a £5 caddy.. this is not only for small "pendrives".

Most pc's/laptops these days allow choice of boot device with a function key.
dzz
 
Posts: 629
Joined: Wed Apr 27, 2011 11:53 am
Location: Devon, England

Re: Alternative usb installation method, part 2

Postby fsmithred » Tue Jan 07, 2014 3:26 pm

Tried again with antiX. Ran 'copy from iso' on the main menu. Note that I did this on a drive that already had a few live systems on it, but none of them had a /live folder in the root of the device. I renamed my syslinux dir so it wouldn't accidentally get clobbered, but the isolinux from the antix iso got copied to the antiX folder and renamed to syslinux. As a result, refracta2usb complained that there was no syslinux directory, so I renamed mine, reinstalled the bootloader, and then copied the menu entry from the antiX menu to my menu. It booted normally.

Then I ran r2u again and selected Multiboot, added antiX to a folder I named antix2. Copied the antix menu entry again and edited it so that it pointed to vmlinuz and initrd.gz in /antix2/antiX. It booted.

Also ran patch-initrd, edited the menu to point to /antix2/antiX/initrd.custom.img. It booted, and I was able to write to /live/boot-dev/ (the equivalent of /lib/live/mount/medium). The menu entry created by patch-initrd thought it should use /sde1/live as the path to the kernel. Need to change the way paths are handled. (Have not yet tested my proposed fix above, using $local_path.)
User avatar
fsmithred
 
Posts: 1987
Joined: Wed Mar 09, 2011 9:13 pm

Re: Alternative usb installation method, part 2

Postby golinux » Tue Jan 07, 2014 5:12 pm

dzz wrote:Full persistence means you can install software and save files.. and it can run surprisingly fast from usb.

There are different ways you can organise and use persistence, just choose the one that suits you and your device best.

Thanks for the clarification. Yes, I saw the 3 options in the README.

dzz wrote:One of my live systems runs from a 200GB laptop HD salvaged from the bin, in a £5 caddy.. this is not only for small "pendrives".

More confusion here . . . so this script will install to a usb external harddrive? But then is it still necessary to use fat32 and ext2 on a more capable medium? Why not just do a normal install to an external drive? Or is the advantage of using this script to avoid potential problems with grub boot options?

dzz wrote:Most pc's/laptops these days allow choice of boot device with a function key.

My friend's machine is about 4 years old - huge tower with multiple drives and at least 8 gigs of ram. Have no idea what his boot options are. He might not either if he's never used them - he's not really that much of a geek but I'm determined (and he's starting to 'get it') . . .
May the FORK be with you!
User avatar
golinux
 
Posts: 643
Joined: Thu Nov 08, 2012 1:23 am

Re: Alternative usb installation method, part 2

Postby fsmithred » Tue Jan 07, 2014 7:37 pm

A usb thumb drive IS an external usb drive. It's just smaller and solid state instead of spinning disks.

On a live-cd or usb, the operating system's filesystem is stored inside a file named filesystem.squashfs. When you run the live system, it gets unpacked from that file. You can't change what's inside that file - the system is read-only. If you set up full persistence, you can edit system files or install software, but none of those changes get applied to what's in filesystem.squashfs. Instead, the edited or added files are stored on the persistent partition (or loopback file), and the operating system knows to use those files instead of the originals from the CD image. If you install a lot of extra software, you could fill up your persistent volume.

So there may be some advantage to using a live system. If you get rooted, or if you screw up your configurations, you can always boot into the original system that came from the live-cd, and you could even wipe the persistent files and start over (from the point of having a read-only system on the media.) You need to use fat32 for the first partition if you're running a live system and using syslinux boot loader. Other partitions don't have to be ext2, but we recommend that for thumb drives because there will be more space and fewer writes to the drive with a non-journaled file system. In theory, it should last longer that way. (I've never heard of anyone counting how many times they could write to a stick before killing it, but I suspect it's fewer times than the manufacturer claims.)

A four year old machine should have a way to select the boot device. It might be F8 (Dell), F12 (I forget - maybe HP) or Esc (my Foxcon motherboard) or some other key. Failing that, you could probably go into the bios and mess with the boot devices and boot order, but that can sometimes get ugly with multiple drives. I've got four internal drives, and I've screwed up the order several times and couldn't boot correctly until I straightened it out.

And about "the three options". There are more options. You can read about them in the debian-live manual (or maybe it's called the live-build manual) and maybe in man live-boot. Do that when you're ready to experience information overload.
User avatar
fsmithred
 
Posts: 1987
Joined: Wed Mar 09, 2011 9:13 pm

Re: Alternative usb installation method, part 2

Postby dzz » Tue Jan 07, 2014 8:04 pm

The script should work on any usb removable disk.

The external I mentioned has a FAT partition of around 20 GB, 2GB swap and the rest ext4. I use persistence files because they are more "flexible". The only reason for ext2 is less writes, which extends the life of usb pens.

If you don't need data-storage compatibility with other platforms (the only reason to ever use FAT) it's also possible to put the live-media on an ext2/3/4 partition and use extlinux as bootloader. The script hasn't included that (yet). Extlinux works in much the same way as (and is actually part of, as is isolinux) syslinux. Some people use grub (but that is much more difficult to set custom configs and menus). Some people use extlinux for fixed disk installs.

Of course you can do a "real" install to your large removable but live-persistence (depending on your needs) can have advantages, e.g. it will be used on different machines.

If you're quick you should see a list of function key options when you switch on, before the default disk's bootloader starts, usually F2, F9, F10, F11 or F12. The one you want allows booting another device one time, without changing the normal default.
dzz
 
Posts: 629
Joined: Wed Apr 27, 2011 11:53 am
Location: Devon, England

PreviousNext

Return to Experimental

Who is online

Users browsing this forum: No registered users and 0 guests

cron
suspicion-preferred