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!

Using the usb image

Tips and Instructional topics. Not for support questions.

Using the usb image

Postby fsmithred » 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: Select all
md5sum refracta-604_usb.img
881db5d3a2907a210063e823f683b0ff  refracta-604_usb.img


Transfer the image to a usb thumb drive that is at least 1GB.
Code: Select all
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.
User avatar
fsmithred
 
Posts: 1987
Joined: Wed Mar 09, 2011 9:13 pm

Re: Using the usb image

Postby meandean » Sun Apr 17, 2011 4:24 pm

would love to have a zsync for the usb image....hint hint....
User avatar
meandean
 
Posts: 392
Joined: Wed Mar 09, 2011 5:16 am

Re: Using the usb image

Postby fsmithred » 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 ass.

Done! Not sure about this, but I think you run this command from the same directory where you have the iso file.
Code: Select all
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.)
User avatar
fsmithred
 
Posts: 1987
Joined: Wed Mar 09, 2011 9:13 pm

Re: Using the usb image

Postby henrypootel » 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!
-Sony Vaio Z1. DC 2.67Ghz i7. 8gb DDR3. Geforce GT 330M. RAID0 4x64Gb SSD.
User avatar
henrypootel
 
Posts: 1
Joined: Tue Feb 07, 2012 4:00 am

Re: Using the usb image

Postby fsmithred » 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

.
User avatar
fsmithred
 
Posts: 1987
Joined: Wed Mar 09, 2011 9:13 pm

Re: Using the usb image

Postby dzz » 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.
dzz
 
Posts: 629
Joined: Wed Apr 27, 2011 11:53 am
Location: Devon, England

Re: To mount refracta-606 usb image

Postby fsmithred » Wed Feb 29, 2012 11:17 pm

Code: Select all
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: Select all
$ 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

User avatar
fsmithred
 
Posts: 1987
Joined: Wed Mar 09, 2011 9:13 pm

Re: Refracta usb with ntfs on first partition

Postby fsmithred » 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: Select all
dmesg |tail
to see the correct device name to use instead of /dev/sdX.

Code: Select all
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: Select all
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: Select all
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.
User avatar
fsmithred
 
Posts: 1987
Joined: Wed Mar 09, 2011 9:13 pm


Return to How-to

Who is online

Users browsing this forum: No registered users and 0 guests

suspicion-preferred