LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-25-2008, 10:11 AM   #1
a_minor
LQ Newbie
 
Registered: Dec 2008
Location: Tehran , IRN
Distribution: Fedora core 16
Posts: 23

Rep: Reputation: 0
find out what is the name of flash disk


Hi all,

I'm newbie to linux, my question is that if I want to boot from flash disk i must know name of this device and use its name to create the proper bootable partition on it, is it right? when i refer to web pages about this, i didn't find appropriate in detailed way for formatting it,and i need so much help in using parted or fdisk to do it,

thanks to everyone who listened to me
please guide me as soon as possible,thanks alot
 
Old 12-25-2008, 11:45 AM   #2
Woodypecker
Member
 
Registered: Mar 2006
Location: Austria
Distribution: Mandriva/Debian
Posts: 104

Rep: Reputation: 17
First, if you want to boot from a flashdisk, you must be sure your bios allows that.
It's NOT "usb floppy" but "usb harddrive" or another choice under harddrives, when you have the usb drive - already partitioned and with bootable flag set - attached to the box, while booting into bios setup.
Then, when you boot from, let's say a live linux cd like knoppix, you will find ("fdisk -l") there is another sdX drive entry which will show your pendrive.
To make sure it is always recognized the same way, no matter how many other partitioned devices are in place, you should use either filesystem labels or UUIDs instead of the plain /dev/sdX (X is variable). Watch out how to find them - places are in /dev/disk/by_whatever on a booted livecd - and how to create filesystem labels and/or to modify /etc/lilo.conf (run lilo afterwards) or /boot/grub/menu.lst.
I found a good description how to make systemrescuecd (live distribution) bootable from usbstick, on their homepage, and now I have it on a keychain
 
Old 12-25-2008, 11:56 AM   #3
saagar
Member
 
Registered: Jul 2008
Location: Chennai, India
Distribution: RHEL5, Ubuntu
Posts: 191

Rep: Reputation: 37
fdisk -l will show that..is it not?
/dev/sda1 or /dev/sda2
 
Old 12-25-2008, 12:42 PM   #4
Quads
Member
 
Registered: Jul 2008
Location: Indiana
Distribution: Fedora, Ubuntu, Slackware
Posts: 203

Rep: Reputation: 34
There is a site somewhere dedicated to pendrivelinux, which is a Mandriva distro, but they give a lot of good information on booting from pendrives, just google it.
 
Old 12-25-2008, 12:44 PM   #5
a_minor
LQ Newbie
 
Registered: Dec 2008
Location: Tehran , IRN
Distribution: Fedora core 16
Posts: 23

Original Poster
Rep: Reputation: 0
thanks to both you

I find my usb in path /dev/sdb and i've partitioned it with on boot flag with the type of vfat, i want to use it for root encrypted key, if you have better advise in this way , i'll be so glad to hear it!
but still another questions:

Quote:
Originally Posted by Woodypecker View Post
To make sure it is always recognized the same way, no matter how many other partitioned devices are in place, you should use either filesystem labels or UUIDs instead of the plain /dev/sdX (X is variable).
i still don't know why i must use label or UUID instead of plain path, and in this way , what is "sun" label meaning? when i use parted to make partition bootable , i realize that sun label is the default label , but i don't know other available lables


Quote:
Watch out how to find them - places are in /dev/disk/by_whatever on a booted livecd - and how to create filesystem labels and/or to modify /etc/lilo.conf (run lilo afterwards) or /boot/grub/menu.lst.
do you mean that i must set /dev/desk/by-label or /by-uuid to use partition labels or uuids? but now i just can access partitions with their plain path and when i try lables , that was a message that "unable to open label-name",
and another question ,how can i create label for existing partitions?

Quote:
I found a good description how to make systemrescuecd (live distribution) bootable from usbstick
where is this good description?,please inroduce it to me

these suggestions helped me alot,
 
Old 12-25-2008, 01:17 PM   #6
Woodypecker
Member
 
Registered: Mar 2006
Location: Austria
Distribution: Mandriva/Debian
Posts: 104

Rep: Reputation: 17
Well, for systemrescuecd it's on their homepage
To label a partition: for ext2/3 use e2label, for vfat mlabel should work.
Here a snippet from my /etc/fstab to show usage of labels:
# Entry for /dev/md2 :
LABEL=ROOT / reiserfs relatime,user_xattr,acl 1 1
and here for lilo.conf
image=/boot/vmlinuz-2.6.25.11-2tmb64Gdazuko
label="2.6.25.11-2tmb64Gdazuko"
root="LABEL=ROOT"
initrd=/boot/initrd-2.6.25.11-2tmb64Gdazuko.img
append="resume=UUID=cf459f26-bfee-4788-8085-d72a245799ad"
vga=1
where you may see label as well as UUID usage.

Btw. you can be perfectly happy with /dev/sdb1 as long as you have no 2nd harddrive installed,
in which case sdb may probably change to sdc - and you have to (cat tries to bite her tail) boot up "something" that allows you to access the usb stick r/w and change bootloader as well as fstab.
 
Old 12-25-2008, 02:23 PM   #7
a_minor
LQ Newbie
 
Registered: Dec 2008
Location: Tehran , IRN
Distribution: Fedora core 16
Posts: 23

Original Poster
Rep: Reputation: 0
thanks! helped me alot
 
Old 12-25-2008, 03:05 PM   #8
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
You can also use the UUID of the filesystem in place of the label. If you know the device node, for example, /dev/sdb1, then you can use the `udevinfo' program to print out the uuid:
udevinfo -q env -n /dev/sdb1

The reason you want to use the UUID or LABEL on removable devices is because a removable device may be given a different device node in the future. The LABEL or UUID are unique identifiers. The same can be true for fixed drives as well, if you repartition or add another drive. Imagine you add a drive to your desktop and need to change the cables around so they all reach. Using the UUID you don't need to fix up your old /etc/fstab entries. Otherwise, the boot process will bail out to the root shell it it gets that far at all.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
copy a file to the flash disk and extract it from the flash disk indu.a Linux - Kernel 2 11-15-2006 03:22 AM
flash disk hernanimagal Linux - Newbie 4 06-05-2006 08:02 AM
Flash disk not visible cvzyl Linux - Hardware 13 06-03-2006 11:50 AM
I can't mount Flash disk bileed Linux - Hardware 1 03-30-2006 11:33 PM
flash disk copy giulioudo Linux - General 4 01-24-2006 12:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:15 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration