You are not logged in.

#1 2009-02-19 06:40:25

cwjiof
Member
From: Taichung, TW
Registered: 2008-01-27
Posts: 131

How to access files in USB stick when installing from it?

I have prepared my installable USB stick (8G) from Arch 2009.02 ISO file, and copied some configuration files to the USB stick. Everything looks well.

After the Arch installation (not reboot yet), I want to access my configuration files on the stick, but I just cannot find them. Where has my USB stick been mounted to, and how can I read the files on it?

I am confused...:rolleyes:

Offline

#2 2009-02-19 07:47:49

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: How to access files in USB stick when installing from it?

To mount your USB stick you can mount it as root.  Using sd(x) as an example, mkdir /mnt/sd(x) in /mnt.

The procedure is

mount -t <file system type> /dev/sd(x) /mnt//sdx

This will mount your stick in /mnt/sd(x).

Confused here that you used an .iso to generate a USB stick installer when the download archlinux-2009.02 is available in .img format for both i686 and X86_64.

Anyhow, the mount should occur per the above details.


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#3 2009-02-19 09:12:14

cwjiof
Member
From: Taichung, TW
Registered: 2008-01-27
Posts: 131

Re: How to access files in USB stick when installing from it?

lilsirecho wrote:

To mount your USB stick you can mount it as root.  Using sd(x) as an example, mkdir /mnt/sd(x) in /mnt...

Of course I tried this, but failed. Well, maybe what I said above is not explicit enough. I mean:
1. the USB stick is just the installable USB stick I used to install Arch;
2. not mounting the USB stick on the system I've installed, but just on the live arch linux OS that the installable USB stick introduced.
After all, I was booting from the USB stick, so it may have been mounted. In fact, I can find it by:
  # cat /proc/mounts
In the output, my USB stick is /dev/sdb1, and the mounted directory is /bootxxx (not remembered, sorry), but I JUST cannot find this directory. So I was confused.

lilsirecho wrote:

...Confused here that you used an .iso to generate a USB stick installer when the download archlinux-2009.02 is available in .img format for both i686 and X86_64...

Yes, I know there's an IMG file for USB stick. But I don't want to use it, because after I use "dd" command writing the IMG file to the USB stick, the stick became the same size (about 330Mb) as the IMG file. Then how can I copy some other files into this 8G USB stick?

So, I used archlinux-2009.02 ISO file. I prepared my USB stick by cfdisk, and formated it. I mounted the ISO file to some directory (using abc as an example), and copied all the files in abc to my USB stick, then installed grub on it. Finally, an installable 8G USB stick was made. smile

Last edited by cwjiof (2009-02-19 09:24:29)

Offline

#4 2009-02-19 16:54:32

konni
Member
From: berlin
Registered: 2008-09-25
Posts: 99

Re: How to access files in USB stick when installing from it?

when you dd the image on the stick, it creates a partition of the img size.
if you still want to use the stick as a storage device, create a second partition (with gparted, parted etc) and mount it via 'mount /dev/sdb2 /mnt'

Last edited by konni (2009-02-19 16:54:58)

Offline

#5 2009-02-20 00:44:01

cwjiof
Member
From: Taichung, TW
Registered: 2008-01-27
Posts: 131

Re: How to access files in USB stick when installing from it?

konni wrote:

...if you still want to use the stick as a storage device, create a second partition (with gparted, parted etc) and mount it via 'mount /dev/sdb2 /mnt'

OK, you're right. However, this second partition created on the stick cannot be recognized on the MS Windows, can it?

Offline

#6 2009-02-20 00:45:36

cwjiof
Member
From: Taichung, TW
Registered: 2008-01-27
Posts: 131

Re: How to access files in USB stick when installing from it?

konni wrote:

...if you still want to use the stick as a storage device, create a second partition (with gparted, parted etc) and mount it via 'mount /dev/sdb2 /mnt'

OK, you're right. However, this second partition created on the stick cannot be recognized by the MS Windows on my friend's laptop, can it?

--------
Oh, how to delete this duplicated post?

Last edited by cwjiof (2009-02-20 00:47:26)

Offline

#7 2009-02-20 01:18:03

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: How to access files in USB stick when installing from it?

Perhaps the information given in the use of the USB stick by the admins applies in your case.  Any USB stick containing the install .img cannot be used for any other purpose without wiping it clean and creating a fat partition.

Any partition created intended for windows should be a fat partition.

Linux grub allows fat32 partitions to be recognized by both linux and windows since linux ignores the windows info in the mbr AFAIK.


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#8 2009-02-20 01:41:12

cwjiof
Member
From: Taichung, TW
Registered: 2008-01-27
Posts: 131

Re: How to access files in USB stick when installing from it?

Maybe I should use a Ext2 partition on my USB stick. MS Windows can read/write a Ext2 partition when Ext2Fsd is installed.

...Let me try it.

Offline

Board footer

Powered by FluxBB