1

Topic: Questions on creating bootable USB

I downloaded GParted live iso and zip file to a USB flash drive from a Vista PC in library.  My laptop has no OS in hard disk so I boot Slax Linux from CD.  How to access USB flash drive from Linux shell and check whether it has a partition using FAT (either FAT16, FAT32) file system?   Where is the root directory in shell: is it the root in the CD that boot Slax Linux or the hd?

2 (edited by santiago_nasar 2010-06-05 22:48:17)

Re: Questions on creating bootable USB

mc wrote:

How to access USB flash drive from Linux shell?

 

1) Boot into Slax using the CD. Don't plug in the USB yet.
2) After it's booted, and you've logged in and everything's settled, plug in the USB drive.
3) Wait a few seconds.
4) Open a terminal and type "dmesg" at the command prompt.
5) Towards the bottom of dmesg's output, look for lines similar to the following:

[ 6139.006416] Initializing USB Mass Storage driver...
[ 6139.007019] scsi4 : SCSI emulation for USB Mass Storage devices
[ 6139.007223] usb-storage: device found at 4
[ 6139.007228] usb-storage: waiting for device to settle before scanning
[ 6139.007238] usbcore: registered new interface driver usb-storage
[ 6139.007340] USB Mass Storage support registered.
[ 6144.005998] usb-storage: device scan complete
[ 6144.007293] scsi 4:0:0:0: Direct-Access     WD       3200BMV External 1.75 PQ: 0 ANSI: 4
[ 6144.009455] sd 4:0:0:0: [sdb] 625142448 512-byte logical blocks: (320 GB/298 GiB)
[ 6144.009962] sd 4:0:0:0: [sdb] Write Protect is off
[ 6144.009968] sd 4:0:0:0: [sdb] Mode Sense: 23 00 00 00
[ 6144.009973] sd 4:0:0:0: [sdb] Assuming drive cache: write through
[ 6144.011207] sd 4:0:0:0: [sdb] Assuming drive cache: write through
[ 6144.011214]  sdb: sdb1 sdb2 sdb3 sdb4 < sdb5 sdb6 sdb7 sdb8 sdb9 sdb10 sdb11 sdb12 sdb13 sdb14 sdb15 >
[ 6144.159957] sd 4:0:0:0: [sdb] Assuming drive cache: write through
[ 6144.159966] sd 4:0:0:0: [sdb] Attached SCSI disk

6) Remember what's inbetween the square brackets in this line:

sd 4:0:0:0: [sdx] Attached SCSI disk

Where 'x' is substituting 'b' in my example dmesg output.   
7) Again from the command prompt type "mount".  If there are lines starting with /dev/sdx, then at very least those partitions of the disk have already been set up for access.
For example, if it says something like:

/dev/sdb1 on /media/directory-name ext3 (rw,nosuid,nodev,uhelper=udisks)

then you look inside the directory /media/directory-name to find the stuff that's on /dev/sdb1. 

8) If the partition that you want isn't listed there, then do the following:
As superuser, type:

#mkdir /mnt/mountpoint
#mount /dev/sdb1 /mnt/mountpoint  #assuming the partition that you want to access is /dev/sdb1

Then leave superuser status and return to your regular user status and go ahead and access your data.

and check whether it has a partition using FAT (either FAT16, FAT32) file system?

once it's mounted, then the same command (mount with no argument) will tell you what filesystem it has on it.

Where is the root directory in shell: is it the root in the CD that boot Slax Linux or the hd?

For most live CDs it resides in your computer's memory but it would be possible for it to be put on your hard drive.