Gparted

Asked by peter

Hello

I've an USB stick. If I open GParted I can't see the USB stick. I've only the following devices:

- /dev/sda1, Filesystem ext3
- dev/sda2, Filesystem extended
- /dev/sda5. Filesystem linux-swap

Why I don't can see the USB stick? Tjanks.
Peter

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu gparted Edit question
Assignee:
No assignee Edit question
Solved by:
peter
Solved:
Last query:
Last reply:
Revision history for this message
ankit (ankitguptajpr) said :
#1

donot plugin external usb when os in running . plugit before u boot ur system then turn ur system on.

And if u dont want to use force command then if u have any windows os installed first open the usb in windows partion and without removing the usb now switch to linux version.
it will work.
Kindly forward me the proceddings.
Ankit Gupta

Revision history for this message
peter (peter-neuweiler) said :
#2

Hi Ankit

Thanks for your answer.

The USB stick is always pluged in. And I don't have Windows on this computer - only Ubuntu. And what do you mean with the force command? In the terminal I couldn't get a manual for force. Thanks.
Peter

Revision history for this message
ankit (ankitguptajpr) said :
#3

try using this command in terminal.
make a folder on Desktop of any name .
"mount -t ntfs-3g /dev/sdax /home/urname/Desktop/folder name -o force."
ur name is the name from which you are logged in.

Revision history for this message
Tom (tom6) said :
#4

Lol, hi Peter :)

In Gparted just look up at the button on the top right hand corner where it says something like "/dev/sda ...". Just click on that button and then roll up and down the list of drives that linux can see. :)

Usb devices are 'hot-swappable', plugging them in should be fine while the system is running. Sometimes you have to 'unmount' or 'eject' a volume before taking it out though.

Ankit wow, what happened? Usually awesome but at last a mistake (i have a huge collection of my own mistakes)

Regards and good luck to all, from
Tom :))

Revision history for this message
Tom (tom6) said :
#5

Note that the partitions

- /dev/sda1, Filesystem ext3
- dev/sda2, Filesystem extended
- /dev/sda5. Filesystem linux-swap

are all on the one physical drive sda, a second drive would be sdb and a third would be sdc etc. There used to be a distinction between hard-drives labelled hda, hdb, hdc and usb sticks which were called sda, sdb, sdc and other sorts of drives had other letters. You can still see the distinction in some other distros of linux.

I'm surprised that your system is working so well when you have your linux-swap partition within an extended partition rather than as a primary partition on its own but it's probable that you have so much Ram that your system rarely uses the swap at all. I've heard that moving the ext3 partition to the end of the drive and putting the linux-swap at the front can significantly increase performance in older machines that use the Linux-swap quite heavily but that's just a theory.

Extended partitions are a fudge-it response to dealing with the problem that drives can only have 4 partitions - presumably a 2bit number was used as standardised protocol, introduced when a whole byte seemed like a huge amount of space. An extended partition usually has to be created as the 3rd or 4th partition to contain all the multitude of partitions that people with lots of different OS's need to fit them all on, or people that want to keep data separate from programs etc. Windows often creates them for a 2nd partition - which just goes to show how wasteful it is to create an extended partition when you don't need to. I think i have just about managed to clear all mine up now but doubtless i still have a disk or 2 that could do with a lot of tidying up.

Revision history for this message
peter (peter-neuweiler) said :
#6

Hi Tom

Thanks for your hint.

I clicked the button on the top right and I got the following information:

- /dev/sda (18.65 GB)
- /dev/sdb (1.88 GB)

I guess, /dev/sdb will be my USB stick. Because it has a capacity of 2 GB. Correct?

If the answer will be yes, this would be the next question:
- In Nautilus and on the desktop the USB stick is called "2.0 GB Media"
- If I click the right mouse button on the icon on the desktop, and if I choose "Propertiea", the mount point is /media/disk

How can I make the connection, that /dev/sdb is the USB stick mentioned in Nautilus or on the desktop? Thanks for your answer.
Peter

Revision history for this message
Tom (tom6) said :
#7

Lol, rounding errors and appearing to be in multiple places is confusing but Gparted gives the right answer for what it needs to do.

I haven't a clue why Nautilus needs to call it something different and it annoys me that i can't seem to change the name. On my dad's machine it would be handy if i could change the name of his Windows partition to something like "WinXp" or something that he could make sense of easily.

If you look in the /dev and the /media folders it begins to make some kind of sense, especially if you plug-in your 2Gb stick & hit refresh while looking in them.

As to "How can I make the connection..." the answer is just by experience. It's one of the techi quirks of linux i'm afraid. Compare it to the location of the desktop in Windows ;)

Bear in mind that linux has hard-links (short-cuts) aswell as the Windows style shortcuts and both behave very differently from each other.

Revision history for this message
Tom (tom6) said :
#8

Errr, i am a noob too btw :)

Not just to Ubuntu but to linux in general. It's amazing how fast i've been learning stuff in this environment. In Windows even a little knowledge was difficult to glean. I'm guessing that one day soon(ish) i'll find out how to change the name and then i'll be all arrogant about that ;)

Revision history for this message
peter (peter-neuweiler) said :
#9

Hi Tom

Thanks for your anser. Have a nice time.

Revision history for this message
peter (peter-neuweiler) said :
#10

Hi Tom

I've only 512 Mb of RAM. Thanks.
Peter

Revision history for this message
Tom (tom6) said :
#11

512 is good :)

Revision history for this message
peter (peter-neuweiler) said :
#12

Thanks *lll.

Revision history for this message
Wim (launchpad-xs4all) said :
#13

Dear all,

the name and place where your USB-stick is mounted can be influenced:
the file /etc/fstab tells linux where to mount, which names the directory has, and which rights are there...

So, if you always want to mount your USB-stick boottime (it stays in the PC ...) then you have to edit fstab; you will understand that ruining that file /etc/fstab will make linux no more running anymore, so be careful!

Let us say these facts (change them for you situation!)
1. the USB-stick is seen as /dev/sdb
2. you want to mount it on /media/usb0/ directory
3. you want a link on your desktop to that place called "USB"

For this, boot your PC in Recovery_Mode (mostly the second line on the boottime grub menu), this will end up in a terminal window, with a prompt like
myself@myPC$ _

(i will describe commands here, and put my comments between brackets; be sure the usb-stick is attached to your PC...)

   ls /dev | grep sd

(probably here you will see sda 1st HDisk, sdb USB; just to check, i will assume /dev/sdb in the rest, everywhere REAPLCE that text in my command by YOUR device-path...)

   cd /media
   ls -l

(this will give all mount points that are already created... ONLY IF there is NO mount directory for the usb-stick we will have to create it... ONLY in that case enter this command:)

   mkdir /media/usb0

   ls -l

(Are the rights of usb0 the same as for other directories ?!?)
(Next we create a link from your Desktop to this directory; and make that link yours;
replace the name peter by your loginname ...
the name USB in /Desktop/USB can be replaced by your favourite name...)

   ln -sv /media/usb0 /home/peter/Desktop/USB

   chown peter /home/peter/Desktop/USB

Now the difficult part: changing the file /etc/fstab.
I will explain (using an example) what is every line in that files says; i will do it vertical here with my comment)

"/dev/sda5" the device-name=the partition to be mounted

"/home" mount-point=the directory to which the device is hooked

"vfat" type of filesystem om that device, mostly ext3=linux vfat=windows auto="linux find it out yourself"

"rw,user" several mount-options, user=mounting happens as-user, so the user can unmount

"0" dump=0-or-1 0=no-dump nessecairy at error 1=dump-needed; leave it 0 in your case

"0" pass=0=info needed at file system check; leave it 0 in your case

(replace names found on your system by YOUR-names, i assume here 3 things:
+ your usb-stick is /dev/sdb
+ the mount point is /media/usb0
+ the usb-stick is FAT32-formatted (auto)

(We are going to add next line {it is ONE line with TAB between every column} in /etc/fstab; i will give the line first, then how to add it...:)

  /dev/sdb /media/usb0 auto rw,user 0 0

(type these commands, and work with the nano-editor:)

   cd /etc

   nano /etc/fstab

(Below on screen you can see the commands, in nano ^W means <Ctrl-W>, this is: press <Ctrl>-key and press <W>-key and release <Ctrl>-key;
So go to the bottom of the file, enter the one line, just like the one i wrote above;
CHECK-it and Double-check it !!
ONLY if ALL is well, press ^O to write the file /etc/fstab.
Press ^X to leave the editor.
Check your work by typing:)

   cat /etc/fstab

(Read it, if OK, then reboot by entering the command:)

   init 6

Let us know what are the replies of Ubuntu to your commands...

Revision history for this message
Tom (tom6) said :
#14

Blimey.

Thanks Menting :)

Revision history for this message
peter (peter-neuweiler) said :
#15

Thanks Menting.