Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] How to view a USB flash drive?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
OneirosAlpha
n00b
n00b


Joined: 09 Jul 2020
Posts: 17

PostPosted: Thu Jul 09, 2020 3:28 pm    Post subject: [SOLVED] How to view a USB flash drive? Reply with quote

I have a VERY old Gentoo/KDE machine that I'm having some issues with, so I want to copy the files on it to a backup.
When I plug in a USB flash drive, nothing happens and it doesn't show up in storage.
Gentoo version: 2.6.19-gentoo-r5
KDE version: 3.5
I have no idea even where to start with this, so any help is greatly appreciated! I'm normally a Windows user, so I'm very much a noob when it comes to linux.


Last edited by OneirosAlpha on Thu Aug 06, 2020 5:12 pm; edited 1 time in total
Back to top
View user's profile Send private message
pietinger
Guru
Guru


Joined: 17 Oct 2006
Posts: 319
Location: Bavaria

PostPosted: Thu Jul 09, 2020 3:46 pm    Post subject: Reply with quote

1. Start a terminal (called "konsole" in kde), do a "su -" and login as root.
2. Type in "tail -f /var/log/messages"
3. Insert your USB-Stick and watch if your linux kernel recognize it. The last line should be something like this:
Code:
Jul  9 17:39:19 localhost kernel: [ 5081.149505] sd 6:0:0:0: [sdc] Attached SCSI removable disk

4. Type CTRL-C
If 3 is yes: Check if there was an [sdb] or [sdc] or [sdd] and insert this into the second command (add "1"):
Code:
First:
mkdir -p /mnt/stick

Second:

mount -t vfat /dev/sdb1 /mnt/stick
- OR -
mount -t vfat /dev/sdc1 /mnt/stick
-OR-
mount -t vfat /dev/sdd1 /mnt/stick

Use it:

cd /mnt/stick
ls
cp ....

You can use your file browser also.

P.S.: If you want to pull off your stick, do BEFORE a "umount /mnt/stick" !
Back to top
View user's profile Send private message
OneirosAlpha
n00b
n00b


Joined: 09 Jul 2020
Posts: 17

PostPosted: Thu Jul 09, 2020 6:15 pm    Post subject: Reply with quote

Thank you so much pietinger!

It is working so far. I was able to mount the drive and copy files to it.

However, when I try to unmount, I get the error: command not found.

Is there another way to unmount the drive? I'm worried that if I just pull it out there will be issues.
Back to top
View user's profile Send private message
Banana
l33t
l33t


Joined: 21 May 2004
Posts: 618
Location: Germany

PostPosted: Thu Jul 09, 2020 6:26 pm    Post subject: Reply with quote

what did you type as the un mount command? It is
Code:
umount
without the n
_________________
My personal space
Back to top
View user's profile Send private message
OneirosAlpha
n00b
n00b


Joined: 09 Jul 2020
Posts: 17

PostPosted: Thu Jul 09, 2020 6:35 pm    Post subject: Reply with quote

Great catch Banana; thank you!

That worked great, and now I just need to work on my ability to read! ;)
Back to top
View user's profile Send private message
OneirosAlpha
n00b
n00b


Joined: 09 Jul 2020
Posts: 17

PostPosted: Wed Aug 05, 2020 5:55 pm    Post subject: Reply with quote

Sorry to bring this thread back, but I have a new issue with mounting:

I got a larger (128GB) USB drive to copy more files, but I can only format it as NTFS or exFAT (in Windows).

When I try to mount it using the

mount -t vfat /dev/sdb1 /mnt/stick

command, I get a WRONG FS TYPE error.

I tried changing VFAT to VTFS, NTFS, exFAT and VEXFAT. Those all give me an error of UNKOWN FILESYSTEM TYPE.

What are the filesystem types named? Am I just using the wrong label or does my version of Gentoo not support either of those filesystems?
Back to top
View user's profile Send private message
halcon
Apprentice
Apprentice


Joined: 15 Dec 2019
Posts: 249

PostPosted: Wed Aug 05, 2020 6:22 pm    Post subject: Reply with quote

Hi OneirosAlpha,

exFAT:
For reading (mounting): install sys-fs/fuse-exfat
And you can mount with `mount.exfat-fuse`, as mentioned in the Wiki, or with `mount -t exfat-fuse`. May include in /etc/fstab with the same type exfat-fuse

For creating (formatting): install sys-fs/exfat-utils
And you can format with `mkfs.exfat`

NTFS:
For both reading and creating: install sys-fs/ntfs-3g
And you can mount with `mount -t ntfs-3g`. May include in /etc/fstab with the same type ntfs-3g
And you can format with `mkfs.ntfs`
Back to top
View user's profile Send private message
OneirosAlpha
n00b
n00b


Joined: 09 Jul 2020
Posts: 17

PostPosted: Wed Aug 05, 2020 6:45 pm    Post subject: Reply with quote

Thanks for the reply Halcon!

When I type "install sys-fs/ntfs-3g" or "install sys-fs/fuse-exfat" I get an error:

install: missing destination file operand after 'sys-fs/fuse-exfat'

I'm sure that I'm missing something here, but I'm not sure what.
Back to top
View user's profile Send private message
halcon
Apprentice
Apprentice


Joined: 15 Dec 2019
Posts: 249

PostPosted: Wed Aug 05, 2020 6:52 pm    Post subject: Reply with quote

OneirosAlpha wrote:
Thanks for the reply Halcon!

When I type "install sys-fs/ntfs-3g" or "install sys-fs/fuse-exfat" I get an error:

install: missing destination file operand after 'sys-fs/fuse-exfat'

I'm sure that I'm missing something here, but I'm not sure what.

install - it was not a command, it was a verb!

I marked all my commands in that post with ``. What is inside ``, is a command.

Install those packages as you usually do, with `emerge`.

EDIT:
Do you see the links to Gentoo Wiki? There is useful information there, including commands.
`emerge --ask sys-fs/fuse-exfat` means that emerge will show the information (for you to check if everyting is fine, not so much packages etc), but will not yet install the package fuse-exfat.
and
`emerge sys-fs/fuse-exfat` will install the package fuse-exfat.
That --ask is like --pretend
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 46145
Location: 56N 3W

PostPosted: Wed Aug 05, 2020 7:17 pm    Post subject: Reply with quote

OneirosAlpha,

You can make a vfat filesystem any size you like on linux and windows will be happy.
The 32G limit was something Microsoft imposed to get users to move to NTFS.
The vfat driver likes to keep the file allocation in RAM and the bigger the filesystem, the more RAM it takes.

ntfs-3g and extFAT are both FUSE filesystems. I would be surprised if they work on your old kernel.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
OneirosAlpha
n00b
n00b


Joined: 09 Jul 2020
Posts: 17

PostPosted: Wed Aug 05, 2020 7:40 pm    Post subject: Reply with quote

Halcon,

Thanks for the clarification! Unfortunately, when I try the 'emerge' command, I get the following error:

ARCH is not set... Are you missing the '/etc/make.profile' symlink?
Is the symlink correct? Is your portage tree complete?

Maybe like NeddySeagoon says, my version of Gentoo might not support those things.
Back to top
View user's profile Send private message
OneirosAlpha
n00b
n00b


Joined: 09 Jul 2020
Posts: 17

PostPosted: Wed Aug 05, 2020 7:42 pm    Post subject: Reply with quote

NeddySeagoon,

Thanks for the info! I tried to format the USB drive in Gentoo as FAT32 using the following commands:

mkfs.vfat /dev/sde1
mkfs -t vfat /dev/sde1

Both give me the same error:

mkfs.vfat: No such file or directory.

What am I missing?
Back to top
View user's profile Send private message
halcon
Apprentice
Apprentice


Joined: 15 Dec 2019
Posts: 249

PostPosted: Wed Aug 05, 2020 8:05 pm    Post subject: Reply with quote

OneirosAlpha wrote:
Halcon,

Thanks for the clarification! Unfortunately, when I try the 'emerge' command, I get the following error:

ARCH is not set... Are you missing the '/etc/make.profile' symlink?
Is the symlink correct? Is your portage tree complete?

Maybe like NeddySeagoon says, my version of Gentoo might not support those things.

Well, if so, installing packages is not an option.

IMPORTANT: Before running mkfs you should double-check that you are using the correct USB-drive name, otherwise you can destroy one of harddisks. Don't make a mistake, for example, typing sdd1 instead of sde1.

We could try to know which relevant packages are already installed in your system. Please run these commands and paste here the output:
Code:
which equery
Code:
ls -a /usr/*bin | grep mkf
Code:
ls -a /usr/*bin | grep fus
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 46145
Location: 56N 3W

PostPosted: Wed Aug 05, 2020 8:06 pm    Post subject: Reply with quote

OneirosAlpha,

Do you have sys-fs/dosfstools installed?

You could boot with a liveCD that has it.
You could even use live media to boot and copy files off your old Gentoo.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
OneirosAlpha
n00b
n00b


Joined: 09 Jul 2020
Posts: 17

PostPosted: Wed Aug 05, 2020 8:43 pm    Post subject: Reply with quote

Halcon,

Here's what I got with those commands:


Code:
which equery
/usr/bin/equery

Code:
ls -a /usr/*bin | grep mkf
mkfifo
mkfontdir
mkfontscale

Code:
ls -a /usr/*bin | grep fus
fuser
oldfuser
Back to top
View user's profile Send private message
OneirosAlpha
n00b
n00b


Joined: 09 Jul 2020
Posts: 17

PostPosted: Wed Aug 05, 2020 8:47 pm    Post subject: Reply with quote

NeddySeagoon,

Not sure about the dosfstools. How do I check?

That's a good idea about the live media. I actually have a USB with Puppy Linux on it that I'll try for formatting my file transfer drive to FAT32.

Unfortunately I don't dare to use the Puppy drive on this old computer, because a bunch of the drives are in a RAID and I'm not sure if booting with a different OS would mess them up. :(
Back to top
View user's profile Send private message
halcon
Apprentice
Apprentice


Joined: 15 Dec 2019
Posts: 249

PostPosted: Wed Aug 05, 2020 8:59 pm    Post subject: Reply with quote

OneirosAlpha wrote:
which equery
/usr/bin/equery

That's good. That utility - equery - can show whether a package is installed or not.

OneirosAlpha wrote:
ls -a /usr/*bin | grep mkf
mkfifo
mkfontdir
mkfontscale

That's not good. There is no one record like mkfs.something (mkfs.fat required). As there is no mkfs.fat, then, dosfstools is not installed. But you could make sure, running
Code:
equery f sys-fs/dosfstools

OneirosAlpha wrote:
ls -a /usr/*bin | grep fus
fuser
oldfuser

There is no fusemount... I am not sure what we can do with fuser and oldfuser.

My opinion is that you'd better try to follow the NeddySeagoon's advice to use a bootable CD (or DVD) with another, modern Linux installation, for your choice. It wiil let you read all the Gentoo files, harddisks, USB drives (and format USB drives), and copy from Gentoo all you need.

EDIT: USB with Puppy Linux should be fine for trying. If RAIDs were configured in Gentoo, this configuration could be copied/used in Puppy. I personally haven't used RAIDs so don't know much about them.
Back to top
View user's profile Send private message
OneirosAlpha
n00b
n00b


Joined: 09 Jul 2020
Posts: 17

PostPosted: Thu Aug 06, 2020 5:10 pm    Post subject: Reply with quote

Thanks for your help everyone!

I was able to format the larger drive to vfat using Puppy Linux on another computer. I'm now happily copying lots of files!
Back to top
View user's profile Send private message
pietinger
Guru
Guru


Joined: 17 Oct 2006
Posts: 319
Location: Bavaria

PostPosted: Thu Aug 06, 2020 5:33 pm    Post subject: Reply with quote

OneirosAlpha wrote:
[...] using [...] on another computer. I'm now happily copying lots of files!

If you have a second computer you can think about copying over your ethernet network ... even if it is a windows machine. Take "scp" on linux and "putty" or "WINscp" at your windows station.
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6699

PostPosted: Thu Aug 06, 2020 9:58 pm    Post subject: Reply with quote

You always have mkfs.vfat - there's one in busybox.
Back to top
View user's profile Send private message
OneirosAlpha
n00b
n00b


Joined: 09 Jul 2020
Posts: 17

PostPosted: Fri Aug 07, 2020 3:55 pm    Post subject: Reply with quote

pietinger wrote:
OneirosAlpha wrote:
[...] using [...] on another computer. I'm now happily copying lots of files!

If you have a second computer you can think about copying over your ethernet network ... even if it is a windows machine. Take "scp" on linux and "putty" or "WINscp" at your windows station.



I would love to be able to be able to access my files by network like I used to, but some setting changed somewhere and I can't get my Gentoo machine to see any other computers on my network and none of the other computers can see it. The consensus in my other thread was to get some big storage and copy the files via USB. :(

https://forums.gentoo.org/viewtopic-t-1116008-highlight-.html
Back to top
View user's profile Send private message
Banana
l33t
l33t


Joined: 21 May 2004
Posts: 618
Location: Germany

PostPosted: Sun Aug 09, 2020 11:45 am    Post subject: Reply with quote

does this also include a ssh connection? You could use rsync to copy your files to or even from anther machine.
_________________
My personal space
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum