Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Usb stick as file sharing (w fat) and with debian live in it

Ask for help with issues regarding the Installations of the Debian O/S.
Post Reply
Message
Author
camarada
Posts: 11
Joined: 2014-06-12 21:08

Usb stick as file sharing (w fat) and with debian live in it

#1 Post by camarada »

Hello all!

i'm looking to set an 8 GB usb stick that is both usable for file sharing with windows machines, but also for booting debian (live) and installing it, hopefully on most of those same machines :).

Booting live is important because i can showcase debian this way.

The trouble here is that windows can't read beyond the first partition of a usb stick, so the fat partition has to be the first.

I'm not an system administrator, just an enthusiast, so my knowledge and computer skills are somewhat limited. So far i've found two distinct solutions.

The first one here is about actually installing debian on the stick, using the installer partitioner to leave a fat partition first and putting grub on the stick's mbr.

I think this has the advantage of being an customizable and upgradeable system But, although i don't really know the difference between this and a live image, i think the later will perform better given the variety of machines it has to boot and also in terms of speed.

The second method is found here. Consists in dd'ing a debian-live iso to the stick normally. Then, changin the partition table to call the first physical partition (the one with debian in it) partition two, or /dev/sdb2. And the second physical partition, the one with fat fs, partition one.

Of course there is a third solution implied, that is, to just buy another stick and get on with it. But as i said, i'm an enthusiast, and that would spoil all the fun, wouldn't it?

I would appreciate any feedback on this two methods, if they work. And also if there is any other solution you know.

Thank you very much in advance, for taking your time reading til here.

wayne128
Posts: 89
Joined: 2011-03-30 15:16

Re: Usb stick as file sharing (w fat) and with debian live i

#2 Post by wayne128 »

I would like to post on 'third solution'.

I had a USB flash, 8G, FAT32 formatted.
Used Easy2Boot to prepare a multiboot Live iso's.
( I had 9 iso, including Debian Wheezy iso, pmagic, RIPLinux, etc).
Then the little left over space are used for copying files to and from various OS ( Windows/Linux)

I used it over and over for many rounds.
Often carry with me, demo to others about Linux OS on Live mode.
Used it in several occasions to shop for used computers on cheap sales, test them over USB boot and run Live to check specs/performances/ temp / etc and bought a few dirt cheap used comps for playing and learning.

It is easily to clone over to another USB flash and even a larger USB drive, follow by partitioning.

The thing is, FAT32 partition is the first partition, therefore there is no issue to use it on Windows OS, just to remember not to disturb the Easy2Boot files.

dzz
Posts: 257
Joined: 2007-02-05 20:39
Location: Devon, England

Re: Usb stick as file sharing (w fat) and with debian live i

#3 Post by dzz »

Refracta2usb (Debian community-developed utility with many advanced options) http://sourceforge.net/projects/refracta/files/tools/ .. Unetbootin also uses FAT and is in Debian repos

Or set it up yourself the cli way (harder) .. more info:
http://www.syslinux.org/wiki/index.php/ ... ux_Project
https://www.debian.org/releases/etch/i3 ... 04.html.en

Syslinux is more flexible and simpler to configure than grub for USB stick bootloader.

User avatar
keithpeter
Posts: 502
Joined: 2009-06-14 08:06
Location: 5230n 0155w

Re: Usb stick as file sharing (w fat) and with debian live i

#4 Post by keithpeter »

dzz wrote:Refracta2usb (Debian community-developed utility with many advanced options) http://sourceforge.net/projects/refracta/files/tools/ .. Unetbootin also uses FAT and is in Debian repos

Or set it up yourself the cli way (harder) .. more info:
http://www.syslinux.org/wiki/index.php/ ... ux_Project
https://www.debian.org/releases/etch/i3 ... 04.html.en

Syslinux is more flexible and simpler to configure than grub for USB stick bootloader.
Interesting and informative thread, thanks all.

I formatted a 4G USB stick with a 1.6 Gb fat32 partition and a second fat32 partition for data with the rest of the space. I used unetbootin from Wheezy repos to write the Debian Live non-free i386 iso

Booting worked, but I had to use failsafe graphics. Data partition found, wifi fine &c. Just ended up with Vesa instead of the Intel driver that usually kicks in on this X60. Using dd results in a perfectly booting Gnome 3 desktop.

Unetbootin just does not seem to work with any USB stick I try (range of manufacturers)

dzz
Posts: 257
Joined: 2007-02-05 20:39
Location: Devon, England

Re: Usb stick as file sharing (w fat) and with debian live i

#5 Post by dzz »

It's difficult to see why Debian-Live graphics setup should be any different between the dd or syslinux method. However I don't know unetbootin particularly (nor gnome3) and avoid it because it's a binary app, not so easily user-customizable nor even humanly readable (WTF is a "ubkernel"?). Refracta2usb by contrast is a bash script which simply calls standard Debian cli tools and uses the original config files from the live iso.

The syslinux.cfg file is essentially the same simple text file format as (in the iso) isolinux.cfg .. it's the actual boot parameters thet matter. I don't know how unetbootin handles that but you should be able to check manually that boot parameters are the same as what's in the iso.

The FAT filesystem has it's limitations but the advantage of cross-platform support. I don't use windows or mac here but when away, my bootable FAT-formatted usb pen is a very useful tool.

camarada
Posts: 11
Joined: 2014-06-12 21:08

Re: Usb stick as file sharing (w fat) and with debian live i

#6 Post by camarada »

Thanks for the replies.

I decided to go with syslinux just to know better whats happening under the hood.

I've setup a 8GB stick with an 2GB fat32 first partition and a second ext2 encrypted one for workin documents.

On the first i installed syslinux on /boot/syslinux directory.

Code: Select all

syslinux -i -d boot/syslinux /dev/sdb1
Next, came the problem of the bootable live linux image. That is normally supplied in the iso-hybrid format. But i discovered this wonderful tool that is live-build, which allows an user to build custom live debian images. So what i did was creating a live image in the tar format. All info can be found here.http://live.debian.net/. Besides other options i used to build the custom image, more importat is --binary-images tar. Those options are passed to the lb config command.

I then just extracted the tar file to my sdb1 partition, under /boot. Made the necessary corrections to the varius syslinux configuration files generated by lb build (essencialy just pointing the path of the linux image to /boot/live/ rather then just /live).

And voilla! Bootable linux on a fat partition, which can still be used to transfer files under windows. And i (think i) can put as many images on that partition, in the /boot/ folder, just taking care to update the syslinux config.

I enjoyed this as a learning experience. But i know it may not be the best solution.

Post Reply