Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Mounting Usb Temporarily to view files.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
Zelt
n00b
n00b


Joined: 07 Jul 2014
Posts: 72

PostPosted: Tue Aug 05, 2014 2:34 pm    Post subject: Mounting Usb Temporarily to view files. Reply with quote

Hello

I am following the handbook/yt video and am at the step where I must download the stage3 tarball and unpack it.
As I do not have a net connection, I decided to dl the stage3 tarball on a separate machine and put it on a usb.

When I insert this into my gentoo machine, if I run cmd fdisk -l I can see the USB, when I run ls /dev/sdf it shows no files.
I then ran cmd mount /dev/sdff /tmp/gentoo , after doing this when I ls /dev/sdff (or ls /mnt/gentoo forgot) I can now see the tarball.

After this I run tar -xjpf mnt/gentoo/stage3.bz2.

The problem I noticed is the bz2 are unpacking into the USB drive.(which also does not have enough space)
Are they not supposed to unpack into the hard drive somewhere?

Regards
Back to top
View user's profile Send private message
Zelt
n00b
n00b


Joined: 07 Jul 2014
Posts: 72

PostPosted: Tue Aug 05, 2014 3:17 pm    Post subject: Reply with quote

Hello

I have managed to get around this by copying the USB files (which are now mounted) to a new directory tempfiles.

Then mounting /tmp/gentoo back to my harddrive(not usb)

Then moving the files from tempfiles to /mnt/gentoo.

So in a way this issue is resolved.

However I wondered is this the best way to do this? Seems quite laborous just to see what files are on a USB.
Is there not a way to just view/copy the files from usb to a directory without mounting?

Regards
Back to top
View user's profile Send private message
RazielFMX
l33t
l33t


Joined: 23 Apr 2005
Posts: 835
Location: NY, USA

PostPosted: Tue Aug 05, 2014 3:20 pm    Post subject: Reply with quote

Quote:

When I insert this into my gentoo machine, if I run cmd fdisk -l I can see the USB, when I run ls /dev/sdf it shows no files.


This makes sense, /dev/sd* are device nodes, not file systems.

Quote:

I then ran cmd mount /dev/sdff /tmp/gentoo , after doing this when I ls /dev/sdff (or ls /mnt/gentoo forgot) I can now see the tarball.


Exactly the right idea! However, I think you may have actually mounted your usb device to /mnt/gentoo which would make it your rootfs for your install, thus you attempted to untar it into your usb drive.

Here is what I would do. This assumes you have already mounted your rootfs to /mnt/gentoo (http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?part=1&chap=4#doc_chap6) and any other file systems already have been mounted at their respective mount points (example, /boot is on /mnt/gentoo/boot, or /var is on /mnt/gentoo/var; depending on how you have your disk partitioned).

Code:

mkdir /tmp/usb
mount /dev/sdff /tmp/usb
cp /tmp/usb/stage3.bz2 /mnt/gentoo
umount /tmp/usb
cd /mnt/gentoo
untar xjpvf stage3.bz2


EDIT:

Zelt wrote:
Hello

I have managed to get around this by copying the USB files (which are now mounted) to a new directory tempfiles.

Then mounting /tmp/gentoo back to my harddrive(not usb)

Then moving the files from tempfiles to /mnt/gentoo.

So in a way this issue is resolved.

However I wondered is this the best way to do this? Seems quite laborous just to see what files are on a USB.
Is there not a way to just view/copy the files from usb to a directory without mounting?

Regards


You have to mount the device. When you have your system set up fully you can get things like automated mounting of USB drives and easy eject (like Windows/Mac). If you don't mount the device, the Operating System has no idea what your device is or how to access it.
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7552
Location: Goose Creek SC

PostPosted: Tue Aug 05, 2014 3:24 pm    Post subject: Reply with quote

tar xvjpf stage3-*.tar.bz2, the command in the handbook has a v in it so you can see progress
with or without the v for things to go well the tarball needs to be in /mnt/gentoo and the active directory need to be /mnt/gentoo and the root partition needs to be mounted at /mnt/gentoo
you wrote: "ls /dev/sdf" and then "mount /dev/sdff /tmp/gentoo" I presume that "mount /dev/sdf /tmp/gentoo" is correct. (Or you have 32 drives with the usb drive attached.)
you should then run (assuming /dev/sda4 is the root partition, use your actual value):
boot the livecd, then:
Code:
mount /dev/sdf /tmp/gentoo
mount /dev/sda4 /mnt/gentoo
cd /mnt/gentoo
cp -rf /tmp/gentoo/stage3-*.tar.bz2 /mnt/gentoo/stage3-*.tar.bz2
tar -xvjpf stage3-*.tar.bz2
ls -l /mnt/gentoo

how current is the video you are using?

note that the next action getting a portage snapshot won't work via emerge-webrsync so you will need to download a snapshot http://distfiles.gentoo.org/releases/snapshots/current/portage-latest.tar.bz2 to usb drive copy it to /mnt/gentoo and extract it:
Code:
 tar xvjf /mnt/cdrom/snapshots/portage-latest.tar.bz2 -C /mnt/gentoo/usr


until you have an internet connection suggest read and heed https://forums.gentoo.org/viewtopic-p-3461249.html , NeddySeagoons' Rough Guide to Maintaining Gentoo via "Sneakernet" BTW what is the reason for no internet?
_________________
Defund the FCC.
Back to top
View user's profile Send private message
Zelt
n00b
n00b


Joined: 07 Jul 2014
Posts: 72

PostPosted: Wed Aug 06, 2014 11:16 am    Post subject: Reply with quote

DONAHUE wrote:
tar xvjpf stage3-*.tar.bz2, the command in the handbook has a v in it so you can see progress
with or without the v for things to go well the tarball needs to be in /mnt/gentoo and the active directory need to be /mnt/gentoo and the root partition needs to be mounted at /mnt/gentoo
you wrote: "ls /dev/sdf" and then "mount /dev/sdff /tmp/gentoo" I presume that "mount /dev/sdf /tmp/gentoo" is correct. (Or you have 32 drives with the usb drive attached.)
you should then run (assuming /dev/sda4 is the root partition, use your actual value):
boot the livecd, then:
Code:
mount /dev/sdf /tmp/gentoo
mount /dev/sda4 /mnt/gentoo
cd /mnt/gentoo
cp -rf /tmp/gentoo/stage3-*.tar.bz2 /mnt/gentoo/stage3-*.tar.bz2
tar -xvjpf stage3-*.tar.bz2
ls -l /mnt/gentoo

how current is the video you are using?

note that the next action getting a portage snapshot won't work via emerge-webrsync so you will need to download a snapshot http://distfiles.gentoo.org/releases/snapshots/current/portage-latest.tar.bz2 to usb drive copy it to /mnt/gentoo and extract it:
Code:
 tar xvjf /mnt/cdrom/snapshots/portage-latest.tar.bz2 -C /mnt/gentoo/usr


until you have an internet connection suggest read and heed https://forums.gentoo.org/viewtopic-p-3461249.html , NeddySeagoons' Rough Guide to Maintaining Gentoo via "Sneakernet" BTW what is the reason for no internet?


The reason for no internet is that I do not have a Ethernet cable long enough, my box is 25 meters from the Router.

When trying the Wireless Option in the early stages, it says something like.

"enter SSID name, or closest SSID will be used", nowhere does it provide a place for me to give a WPA code (my router is passphrase protected).

I do not want to unlock my router in the enviroment I am in, especially as the installation is probably going to take me along time.

Its very irritating that for something so common and nearly always comes hand in hand, there is no option for it... (WEP,WPA, Routers)
_________________
k.


Last edited by Zelt on Thu Aug 21, 2014 2:30 pm; edited 1 time in total
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7552
Location: Goose Creek SC

PostPosted: Wed Aug 06, 2014 6:39 pm    Post subject: Reply with quote

http://www.sysresccd.org/Sysresccd-manual-en_How_to_install_SystemRescueCd_on_an_USB-stick has a 99% (IMO) chance of providing a wireless connection using networkmanager in an xfce desktop. sysresccd is gentoo based and is a better install media being much less minimal.
_________________
Defund the FCC.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing 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