Tips and Instructional topics. Not for support questions.
Post a reply
fsmithred

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

## Using the usb image

Sat Apr 16, 2011 3:52 am

Make a live usb stick
Download the image and check the md5sum
http://distro.ibiblio.org/pub/linux/dis ... 6.0.4-usb/

Code:
  `md5sum refracta-604_usb.img
  881db5d3a2907a210063e823f683b0ff refracta-604_usb.img`

Transfer the image to a usb thumb drive that is at least 1GB.

Code:
  `dd if=refracta-604_usb.img of=/dev/sdX`

where X is replaced with the letter for your thumb drive. Run dmesg after plug the stick in to get the correct device name.
Reboot. (you may need to set your bios to boot from usb.)
If your usb drive is larger than 1GB, you could create a second partition and label it home-rw or live-rw to be able to boot into persistent mode. (I can write more about this later.)
Install Refracta
Install refracta from usb the same way you'd install from CD. Installers are listed in the menu under System. Pick one and run it. Refracta Installer is simple to use and puts everything in one partition. Refracta Installer New gives you more choices, such as multiple partitions or encrypted partitions.
Changing the system on the usb stick
Configure your installed system the way you want it.
Create a snapshot.
Mount the iso file
Plug the stick in and mount it.
Copy live/boot/ from the stick to a safe temporary location on your installed system.
Delete the live folder on the mounted stick.
Copy the live folder from the mounted iso onto the stick.
Copy the saved boot folder back into the new live folder on the mounted stick.
Done.
The current live folder is around 640MB, and the entire image is 985MB, so you have some room to install quite a bit of software before you would need to make the partition bigger.
meandean

- meandean
- Posts: 392
- Joined: Wed Mar 09, 2011 5:16 am

## Re: Using the usb image

Sun Apr 17, 2011 4:24 pm

would love to have a zsync for the usb image....hint hint....
fsmithred

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

## Re: Using the usb image

Sun Apr 17, 2011 9:51 pm

Sure, I'll zsync it as soon as I get done with this post. What I'm wondering is if I should shrink the partition and upload it again. I made it to just fit on a 1GB stick, even though it only really uses about 650MB. Did that so people could install, add stuff, make a snapshot, then just copy the new live folder without having to increase the size of the partition. If you only have one partition, that's no big deal, but if you want to do that after making additional partitions, it can be a pain in the ***.
Done! Not sure about this, but I think you run this command from the same directory where you have the iso file.

Code:
  `zsync -i refracta-6.0.4-xfce.iso http://distro.ibiblio.org/pub/linux/distributions/refracta/files/6.0.4-usb/refracta-604_usb.img.zsync`

I suppose you could use the beta iso, too. Just change the filename after the -i option. (Let me know if this is wrong or doesn't work.)
henrypootel

- henrypootel
- Posts: 1
- Joined: Tue Feb 07, 2012 4:00 am

## Re: Using the usb image

Tue Feb 07, 2012 4:06 am

> If your usb drive is larger than 1GB, you could create a second partition and label it home-rw or live-rw to be able to boot into persistent mode. (I can write more about this later.)

(sorry to necrobump) Care to elaborate on the Presistence stuff at all?
I have used Refractasnapshot to make a nice custom Crunchbang install which I'm running off a USB stick. I'd really like some persistence though. So I just need to make a partition (ext2?) with the label 'live-rw', and that'll do it?
Is there any other way? In the land of my dreams, I'd like to be able to have a single fat32 partition on my stick with the squashfs, syslinux etc.. and have that run in persistent mode accessing a 1 or 2 gb XFS file or whatever.
Is that possible?
Sorry if i sound needy. Loving the tool BTW, and like Refracta OS as well - just not ready to leave OB for XFCE just yet!
fsmithred

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

## Re: Using the usb image

Tue Feb 07, 2012 10:41 am

In addition to the labeled partition, you have to add the word "persistent" to the boot line. (There's already an entry for it on the usb image). Label the partition home-rw to have persistent files in your home, or label it live-rw to have persistent files anywhere in the filesystem.
http://live-manual.debian.net/manual-2. ... n.html#498
Right now, there's no usb image on the official download site, but you might be able to get it from nadir's part-time server - http://resident.dyndns.info/refracta/actual/
If you want a single fat32 partition, take a look at this thread to see how dzz does it -
experimental-alternative-usb-installation-method-t103.html
Alternate links for the usb images (March 2012)
usb.img 32
http://min.us/m9Zvv4FFt
usb.img 64
http://min.us/mOMpGdgyc
.
dzz

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

## Re: Using the usb image

Tue Feb 07, 2012 2:25 pm

Sure that is possible on a single FAT32 usb stick, I have even multiboot, direct from iso, with persist for each. Most documented methods require two partitions and the squashfs manually extracted.
My script is still "experimental" but (deliberately) does not do automatic formatting or other potentially destructive acts. Once you got it going you can just edit menus, change or add live images...
If preferred, everything is possible also manually, using standard cli tools
FAT formats should use the syslinux bootloader. The tricky bit (for some) can be getting the stick to actually boot at all. You might have to do a little black magic on the MBR first, especially if grub or isohybrid was used previously (that is discussed there also)
General performance using a persistent live-boot image is surprisingly good.
fsmithred

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

## Re: To mount refracta-606 usb image

Wed Feb 29, 2012 11:17 pm

Code:
  `mount -o loop,offset=32256 refracta-606_<date>_usb.img /mountpoint`

Edit: To get the offset, use the 'file' command to get the startsector, and mulitply by 512.

Code:
  `$ file refracta-606_20120216_usb.img
  refracta-606_20120216_usb.img: x86 boot sector; partition 1: ID=0x83, active, starthead 1, startsector 63, 1879542 sectors, code offset 0x63[
  63 x 512 = 32256
  `

fsmithred

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

## Re: Refracta usb with ntfs on first partition

Tue Mar 27, 2012 4:16 pm

Refracta usb with ntfs on first partition (so Windows will see it)
Plug the usb stick into a running linux system.

Code:
  `dmesg |tail`

to see the correct device name to use instead of /dev/sdX.

Code:
  `dd if=refracta-<version>_usb.img of=/dev/sdX`

In gparted, move /dev/sdX1 to the end of the usb stick, and create
a new ntfs partition at the beginning.
Both partitions should show up on a linux desktop now (you may need to unplug and replug the stick)
and the stick will be bootable. But the partitions are out of order.
In windows7, only /dev/sdX1 showed up, and it was the refracta partition.
With the stick plugged into a running system, run

Code:
  `fdisk -i /dev/sdX
  then choose 'x' for Expert mode
  then choose 'f' to re-number partitions
  then choose 'w' to write the partition table and exit.`

Now the partitions are in correct order -
/dev/sdX1 is ntfs, /dev/sdX2 is linux (or fat, depending on how you check it)
But it won't boot. Have to reinstall grub.
With the stick plugged into a running system and mounted, run

Code:
  `grub-install --root-directory=/media/REFRACTA/live /dev/sdX`

The stick should now boot correctly, and the ntfs partition should show up in windows7.
Same procedure should work if you want fat32 instead of ntfs.
Post a reply
Jump to:

Powered by phpBB © phpBB Group.

phpBB Mobile / SEO by Artodia.