LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 09-23-2005, 05:20 PM   #1
Halsafar
Member
 
Registered: Sep 2005
Posts: 37

Rep: Reputation: 15
Mount HardDrives from kernel


All I can do is boot into an installation kernel and from there begin the procedure of mounting necessary drives... at least this is what I think I'm doing.

mkdir /mnt/sda6
mount /dev/sda6 /mnt/sda6
chroot /mnt/sda6

Does this mount the sda6 partition so I can access it? Then chroot it to tell the kernel where the root is?

If so, then how can I access my sda8 partition?

I need to copy a file to the Fat32 Partition (sda8) I should have....
Altho "df" gives terrible output:

Name --------> Mount
/dev/sda6 --> /
/dev/sda7 --> /home
none --> /dev
/dev/sda6 --> /.dev

1K-blocks for all = 2887108 which is wrong!
Used for all = 835244 which is also WRONG!
Available for all = 1905204 which is VERY WRONG!

However, it is only df which shows this incorrect output.

It should be
sda1 = NTSF WinXp
sda5 = swap
sda6 = ext3 root
sda7 = ext3 home
sda8 = Fat32 share

Last edited by Halsafar; 09-23-2005 at 05:25 PM.
 
Old 09-23-2005, 06:23 PM   #2
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
Ok, let me see if I can understand what you are asking/saying.

You boot up into "rescue" mode on a installation CD. Then, you mount your root partition of a linux install. You then chroot, which changes your root directory to /dev/sda6 instead of the virtual root that your install CD has created. You then want to access /dev/sda8 to copy a file to it. df, mount or any other tool you use will likely be incorrect in this environment. /proc is created from the install CD, therefore when you chroot, the /proc that NOW exists is empty, and your tools that cat info out of the proc filesystem will report this information incorrect because of this.

If you just want to copy a file from /dev/sda6 to /dev/sda8 then you can mount them and copy files without having to chroot into your /dev/sda6 filesystem.

mkdir /mnt/sda6
mkdir /mnt/sda8
mount /dev/sda6 /mnt/sda6
mount /dev/sda8 /mnt/sda8

Then to copy a file:
cp /mnt/sda6/file /mnt/sda8/file

If there are subdirectories involved you can list them just the same. So, for sake of example, we'll use /var/log/messages We are going to assume you want to copy /var/log/messages to your fat32 partition, just in the root of the partition (listed in windows as something like C:\)
so to do this, we mount the devices as noted above, then:
cp /mnt/sda6/var/log/messages /mnt/sda8/

And it will copy the messages file to the fat32 partition.

HTH

If I misunderstood your question, feel free to clarify.

Good Luck!

Cool
 
  


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
two harddrives pharmd Ubuntu 7 04-18-2005 08:19 PM
How to mount harddrives Jeff Hardy Slackware 1 08-27-2004 08:58 PM
harddrives Celestial Linux - Newbie 3 07-01-2004 03:30 PM
Harddrives Celestial Slackware 1 06-30-2004 08:18 PM
harddrives cleeadkins Linux - Hardware 8 10-09-2003 07:56 AM

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

All times are GMT -5. The time now is 06:15 AM.

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