LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 10-24-2004, 01:40 PM   #1
rasgward
Member
 
Registered: May 2004
Location: Virginia
Distribution: ubuntu
Posts: 31

Rep: Reputation: 15
Can you tell me how to mount my hda1 on my Mandrake distro running in Hdb I can use


Hello,
If anyone can help this newbie mount his hda1, which I believe is my original hardrive. I had fedora 1 installed on hda and then installed Mandrake on hdb thinking I could set lilo to go to either. Well, Fedora was to never be seen again. I think it is still there though. Anyway, here is my /etc/fstab
thanks! I want my users to be able to save stuff to it. I will reformat it if I need to. I just want the space. Thanks! -Greg
/dev/hdb1 / ext3 defaults 1 1
none /dev/pts devpts mode=0620 0 0
/dev/hdb8 /home ext3 defaults 1 2
/dev/hdc /mnt/cdrom auto umask=0,user,iocharset=iso8859-1,codepage=850,noauto,ro,exec 0 0
/dev/hdd /mnt/cdrom2 auto umask=0,user,iocharset=iso8859-1,codepage=850,noauto,ro,exec 0 0
none /mnt/floppy supermount dev=/dev/fd0,fs=ext2:vfat,--,umask=0,iocharset=iso8859-1,sync,codepage=850 0 0
none /proc proc defaults 0 0
/dev/hdb9 /tmp ext3 defaults 1 2
/dev/hdb6 /usr ext3 defaults 1 2
/dev/hdb7 /var ext3 defaults 1 2
/dev/hda2 swap swap defaults 0 0
/dev/hdb5 swap swap defaults 0 0
 
Old 10-24-2004, 02:29 PM   #2
UsualTuxpect
Member
 
Registered: Aug 2004
Location: New York
Distribution: --------- Gentoo-2004.2 [2.6.8] Redhat-9 [2.6.6]
Posts: 545

Rep: Reputation: 31
Please post the output of -->#fdisk -l
 
Old 10-25-2004, 04:39 AM   #3
rasgward
Member
 
Registered: May 2004
Location: Virginia
Distribution: ubuntu
Posts: 31

Original Poster
Rep: Reputation: 15
here's the output. thanks.

Disk /dev/hda: 20.0 GB, 20020396032 bytes
255 heads, 63 sectors/track, 2434 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 13 104391 83 Linux
/dev/hda2 14 2434 19446682+ 82 Linux swap

Disk /dev/hdb: 40.9 GB, 40982151168 bytes
16 heads, 63 sectors/track, 79408 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 * 1 1625 818968+ 83 Linux
/dev/hdb2 1626 63149 31008096 5 Extended
/dev/hdb5 1626 3250 818968+ 82 Linux swap
/dev/hdb6 3251 11376 4095472+ 83 Linux
/dev/hdb7 11377 27542 8147632+ 83 Linux
/dev/hdb8 27543 53046 12853984+ 83 Linux
/dev/hdb9 53047 55077 1023592+ 83 Linux
/dev/hdb10 55078 63149 4068256+ 83 Linux
 
Old 10-25-2004, 11:06 AM   #4
UsualTuxpect
Member
 
Registered: Aug 2004
Location: New York
Distribution: --------- Gentoo-2004.2 [2.6.8] Redhat-9 [2.6.6]
Posts: 545

Rep: Reputation: 31
Hi,

I dont see ur / parition[which houses /root ,/etc/,/usr and others] on ur hda.

looks like you made only boot and swap on hda .

Did fedora run atleast once on your comp??.
 
Old 10-27-2004, 05:09 PM   #5
rasgward
Member
 
Registered: May 2004
Location: Virginia
Distribution: ubuntu
Posts: 31

Original Poster
Rep: Reputation: 15
yeah I used fedora at least once

I definitely used Fedora a bunch of times. I think my boot program is on hda, but I want to use the rest of the drive. What should I do to save the boot but format and/or mount the drive to use. Thanks.-Greg
 
Old 10-27-2004, 05:50 PM   #6
mcd
Member
 
Registered: Aug 2003
Location: Denver, CO
Distribution: CentOS, Debian
Posts: 825

Rep: Reputation: 33
well, you can manually mount hda like this:

su root
mkdir /mnt/hda
mount -t vfat /dev/hda /mnt/hda

and then go in and check by hand what's there. first though, i would look at fdisk in a little more detail. are you comfortable navigating around in fdisk? basically it looks to me like you wiped out the partition table, and now you just have a small (100 mb) /boot partition, and another (19 gig) /swap partition. i have trouble believing that though, so maybe my eyes are lying to me. anyway, here's what i would do.


to run fdisk, it's best to change to runlevel 1, which means most background processes are shut down. do this in a terminal:

su root
telinit 1
(login again)
su root
fdisk /dev/hda


now press p and you should see 2 partions listed, one that has "82 (linux swap)" toward the right-hand side, and one that's "83 (linux)". at this point, the best thing i can think of is to try adding a new partition, and see how big it allows you to make it. then if you want to try recovering data, exit fdisk WITHOUT writing the changes to disk and you won't have made any permanent changes, or if you want to just reformat and create space, you can do that too. so here: http://www.bitbenderforums.com/vb22/...?postid=311808 is a good walkthrough of fdisk (it's tailored to people installing slackware, but it's still good step-by-step instructions with screenshots to boot).

basically though, you want to create a (n)ew (p)rimary partition, hda(3). now it should prompt you for starting cylinder, just hit enter and it will automatically start at the next available one (where hda2 stops). when it asks for last cylinder, you have two options: hit enter to go to the end of the disk, and then check how big it is with (p)rint partition table, or instead of giving it the last cylinder, you can specify how big you want the partition to be in megabytes by entering a number like this

+10000M (10 gigabytes)
+500M (500 megabytes)

if you're going to format the disk and create a new partition table though, you might as well delete hda2 first, since you don't need 2 /swap partitions. anyway, i hope i'm not confusing you even more, post up if you want more/better advice!
 
Old 10-28-2004, 11:38 AM   #7
rasgward
Member
 
Registered: May 2004
Location: Virginia
Distribution: ubuntu
Posts: 31

Original Poster
Rep: Reputation: 15
cool.. I will try

Thanks I will try to do this.
I am going to erase the drive I guess hda2 completely and recreate a hda2, Like I said, my boot program, or whatever its called is on Hda but I want to erase the rest of the drive and use its space. Any more advice I appreciate, but I will try what you said. -Greg
 
Old 10-28-2004, 07:05 PM   #8
mcd
Member
 
Registered: Aug 2003
Location: Denver, CO
Distribution: CentOS, Debian
Posts: 825

Rep: Reputation: 33
then before you do that make sure to copy lilo onto a floppy disk so you can still boot!! lots of instructions around for that, seach the forums.
 
Old 11-01-2004, 10:57 AM   #9
rasgward
Member
 
Registered: May 2004
Location: Virginia
Distribution: ubuntu
Posts: 31

Original Poster
Rep: Reputation: 15
okay here goes...

Hey MCD,
Thanks for all the advice. So, I erased the hda2 swap partition since I had a swap on hdb. I left the boot parition, and reformatted the hda2 as a journalised FS Ext 3? Does that sound right? Still trying to figure out how to mount it on my desktop or somewhere so I can save files to it. I named it /home2
which I don't know why other than trying to figure it out and I knew I had a /home already.
Thanks. -Greg
I will try your mounting advice again.
 
Old 11-01-2004, 11:16 PM   #10
mcd
Member
 
Registered: Aug 2003
Location: Denver, CO
Distribution: CentOS, Debian
Posts: 825

Rep: Reputation: 33
alright, it seems like you're getting the hang of fdisk, it's a useful thing to understand. ^^

i was going back over my advice, and aside from my typo in not including the partition number to /dev/hda, i also wanted to explain a little better:

Quote:
su root
mkdir /mnt/hda
mount -t vfat /dev/hda /mnt/hda
that should be

mount -t <filesystem type> /dev/hdax /mnt/path

in other words, you have to specify the filesystem type, which partition to mount, like /dev/hda1 or /dev/hdb3, and the directory you would like the device mounted to (mount-point iirc).

so you need to decide on a filesystem type. if you only want it for use with linux computers, ext3 is a fine choice. if you want to share the partition with windows computers, you should make it FAT32 or NTFS. write support for NTFS is still experimental/dangerous in linux, so if you want to be able to write to the drive in linux you should probably make the partition FAT32. the only issue may be the maximum partition size allowed by FAT32...i don't remember whether this will matter or not. worst case scenario: you make multiple partitions.

as for the mount path, you can make it whatever you like, but i would suggest something like /mnt/multimedia or /mnt/storage. to have it automatically mounted when the computer is rebooted, you can add an entry in your /etc/fstab like this:

/dev/hda2 /mnt/multimedia vfat defaults,umask=000 0 0 <-- for fat32
/dev/hda2 /mnt/multimedia ntfs defaults,umask=000,ro 0 0 <-- for ntfs

as for creating a shortcut for your desktop, that will really depend on which distro the user's computer is. for mandrake, i know there is an option (maybe right-click on the desktop, maybe through adding a launcher or something) for adding a hard drive icon to the desktop. i've used it before.

Last edited by mcd; 11-01-2004 at 11:18 PM.
 
Old 11-02-2004, 05:49 AM   #11
rasgward
Member
 
Registered: May 2004
Location: Virginia
Distribution: ubuntu
Posts: 31

Original Poster
Rep: Reputation: 15
great. now we're getting somewhere

Hey MCD
Thanks, I feel like you just touched on a bunch of stuff I was confused on. THat really helps. Let me give it a whirl. -greg
 
Old 11-02-2004, 02:39 PM   #12
mcd
Member
 
Registered: Aug 2003
Location: Denver, CO
Distribution: CentOS, Debian
Posts: 825

Rep: Reputation: 33
glad to hear it! make sure to read man mount, and google/linux fstab. just read around and see what you find, i always find that the more i read before i begin, the better i understand what went wrong at the end
 
Old 11-04-2004, 02:15 AM   #13
rasgward
Member
 
Registered: May 2004
Location: Virginia
Distribution: ubuntu
Posts: 31

Original Poster
Rep: Reputation: 15
still having issues...

okay,
I created the dir /mnt/otherstuff and i typed mount -t vfat /dev/hda5 /mnt/otherstuff
this seemed to have worked, but now I would like to know what to type in the /etc/fstab to access it as a user. I tried what you said about 000 0 0 but it didn't seem to work, any thoughts? I've been searching...
here's my fstab

/dev/hdb1 / ext3 defaults 1 1
none /dev/pts devpts mode=0620 0 0
/dev/hdb8 /home ext3 defaults 1 2
/dev/hdc /mnt/cdrom auto umask=0,user,iocharset=iso8859-1,codepage=850,noauto,ro,exec 0 0
/dev/hdd /mnt/cdrom2 auto umask=0,user,iocharset=iso8859-1,codepage=850,noauto,ro,exec 0 0
none /mnt/floppy supermount dev=/dev/fd0,fs=ext2:vfat,--,umask=0,iocharset=iso8859-1,sync,codepage=850 0 0
/dev/hda5 /otherstuff vfat unmask=000 0 0
none /proc proc defaults 0 0
/dev/hdb9 /tmp ext3 defaults 1 2
/dev/hdb6 /usr ext3 defaults 1 2
/dev/hdb7 /var ext3 defaults 1 2
/dev/hdb5 swap swap defaults 0 0
 
Old 11-04-2004, 02:10 PM   #14
mcd
Member
 
Registered: Aug 2003
Location: Denver, CO
Distribution: CentOS, Debian
Posts: 825

Rep: Reputation: 33
Quote:
/dev/hda5 /otherstuff vfat unmask=000 0 0

well, first of all, did you create /otherstuff or /mnt/otherstuff? make sure you're mounting it in the right place. second, you should add defaults in as an option, and third, it's umask, not unmask. so it should look like this:


/dev/hda5 /mnt/otherstuff vfat defaults,umask=000 0 0


that should do it for you. if you still have trouble, let me know.
 
Old 11-07-2004, 10:28 PM   #15
rasgward
Member
 
Registered: May 2004
Location: Virginia
Distribution: ubuntu
Posts: 31

Original Poster
Rep: Reputation: 15
hmm...

That' s funny, because I think I did keep it as unmask, but I chmod'd it to the user. So it worked. -Greg
I feel like I should still change it. -Greg
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Damaged hda1, Can't Mount hdb1 doctorcisco Linux - Hardware 1 12-28-2004 08:24 PM
can't mount /dev/hda1 (my WindowsXP partition) ZoeNStC Linux - General 3 09-18-2004 11:40 AM
Can't mount hda1 and can't get xfree86 setup mlsbraves Slackware 4 09-15-2004 07:51 PM
Can mount hda1, but not hda2,3,4,5, or 6? Dobie Linux - Newbie 4 06-13-2004 04:37 PM
mount filesystems from hda1 and hda2 jhirshon Linux - Newbie 3 01-29-2004 12:05 PM

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

All times are GMT -5. The time now is 09:09 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