I just put a second harddrive into my linux comp. What do I do to see if it is installed right? And how do I use it if it is?

I'm using Damn Small Linux (DSL)
instead of hda, you use hdb.
Oh, cool, I see it there in /mnt/hdb1. Thanks. It says the directory is empty, but I could have sworn there was a windows install on that drive... Is there a way I can view the windows files from it or do I just need to go repartion it?

Oh, and another thing. Before I do that. Is there a way I can dual boot my primary drive's linux and the slave's windows? Is that easier than single drive dual-booting?

EDIT: Or do you think it's right about the drive being empty?

EDIT2: Heh, it says hda1 is empty, too. That's the drive I booted from. Confused
if you know how to boot into windows on the first drive, instead of (hd0,0), it would be (hd1,0) or something like that in Grub. Do a google search on it.
you can also add it to your fstab file to have it auto mounted on boot to be accessible from Linux
Alright, I'll check in to that.

And for just using the second drive, in my fstab, is this what I add? (i'm still a total n00b at this)


Code:
#partions found by dsl
# /dev/hda1/mnt/hda1 ext2 noauto,users,exec 0 0
# /dev/hdb1/mnt/hdb1 ext2 noauto,users,exec 0 0

(first 2 lines were already there)

Also, is there anything else I need to do at the terminal for use? Like chmod-ing or something?
Try this:


Code:
fdisk -l /dev/hdb


It'll output all partitions on your second hard drive.

And change

Code:
/dev/hdb1/mnt/hdb1 ext2 noauto,users,exec 0 0


To


Code:
/dev/hdb1 /mnt/hdb1 ntfs noauto,users,exec 0 0


After running fdisk -l /dev/hdb to determine where your windows partition is.
foamy3 wrote:
Alright, I'll check in to that.

And for just using the second drive, in my fstab, is this what I add? (i'm still a total n00b at this)


Code:
#partions found by dsl
# /dev/hda1/mnt/hda1 ext2 noauto,users,exec 0 0
# /dev/hdb1/mnt/hdb1 ext2 noauto,users,exec 0 0

(first 2 lines were already there)

Also, is there anything else I need to do at the terminal for use? Like chmod-ing or something?


hdb1 shouldn't be ext2 unless thats what its formatted as, its probably vfat, or (God forbid) ntfs. if its ntfs you'll need to install an ntfs driver first
Umm... thats an invalid fstab snippet, which is probably why its commented out. There needs to be a space between /dev/hda1 and /mnt/hda1 (and so on for each line) That could be why they are showing up as empty Very Happy (oh, and the drive you boot from will be mounted at /, it won't be in /mnt, lol)

Post your entire /etc/fstab file

elf is right though, your new harddrives entry should be


Code:
/dev/hdb1 /mnt/hdb1 vfat users,defaults 0 0


Then either reboot or type "mount /mnt/hdb1"

To boot to it is easy. Just add this to /boot/grub/grub.conf (or /boot/grub/menu.lst )


Code:
title=Windows On Second Drive
rootnoverify (hd1,0)
makeactive
chainloader +1
Woah, I just opened up my fstab and found this at the bottom.


Code:
#Added by KNOPPIX
/dev/hdb1 /mnt/hdb1 vfat noauto, users, exec, umask=000, uid=1001, gid=50 0 0


Does that mean it will automount on reboot? Or is that just a temporary thing?
it will *not* be added at boot, but you can fix that by just changing "noauto" to "auto" in that line, or you can add it immediately with "mount /mnt/hdb1" - it isn't a temporary thing, although I am unsure why knoppix is messing around with files on the harddrive... o.0
Okay, I changed the noauto to auto and rebooted. In the terminal "cd /mnt/hdb1" works fine, but "ls" does nothing. Err, "ls" does nothing in /mnt/hda1, too.

How am I supposed to browse hdb1's files?
post your complete /etc/fstab file (and /mnt/hda1 isn't mounted, thats why its empty - the "#" at the begining of a line means its a comment, and is therefore ignored)

also try just doing "mount /dev/hdb1 /mnt/hdb1 -t vfat" and see what happens
Kllrnohj wrote:
post your complete /etc/fstab file (and /mnt/hda1 isn't mounted, thats why its empty - the "#" at the begining of a line means its a comment, and is therefore ignored)

also try just doing "mount /dev/hdb1 /mnt/hdb1 -t vfat" and see what happens


I'm having trouble saving fstab to my usb drive. I also can'y copy/paste from it. Is that a root problem?

And I added that stuff to my grub file, but when I rebooted, I saw that LILO was handling it, not Grub. I must have switched them last time I reinstalled. Is there any way to switch back over to GRUB?
Yea, you can't save fstab unless your root, so when you open it, do:

sudo edittor /etc/fstab (replace edittor with your text editting program like gedit)
I have no idea with DSL - you *could* always switch to a more newb friendly distro like Ubuntu (have em ship you CDs if you are on dial-up), which will probably benefit you more in the long run

as for fstab, yes, you must be root (I thought you knew that already, sorry)
/dev/hda1 / ext2 defaults,errors=remount-ro 0 1
proc /proc proc defaults 0 0
/dev/fd0 /floppy vfat defaults,user,noauto,showexec,umask=022 0 0
/dev/cdrom /cdrom iso9660 defaults,ro,user,noexec,noauto 0 0
#usb drive
/dev/sda1 /usb auto defaults,rw,user,noauto 0 0
# partitions found by dsl
#/dev/hda1 /mnt/hda1 ext2 noauto,users,exec 0 0
# Added by KNOPPIX
/dev/hdb1 /mnt/hdb1 vfat noauto,users,exec,umask=000,uid=1001,gid=50 0 0

EDIT: I ordered Ubuntu from ShipIt last week Smile
Ok, /dev/hdb1 is still noauto, hence the reason its empty on boot. Type "mount /mnt/hdb1" and all your stuff should be there. Otherwise change that "noauto" to "auto". /mnt/hda1 is empty because 1) it is commented out, and 2) I have no idea what sort of havok recursively-mounting a partition would cause.... (since /dev/hda1 is /, if you mounted it at /mnt/hda1 as well you would in effect also have it mounted at /mnt/hda1/mnt/hda1, /mnt/hda1/mnt/hda1/mnt/hda1 and so on) - Obviously there is no reason to mount /dev/hda1 at /mnt/hda1 anyways, as its already mounted at /
Excellent! I got hdb1 mounted, and was able to view all of the files on it. I'm still having some trouble dual-booting, though. I have a GRUB config file, but LILO is my current bootloader. I did a google search on Lilo about editing it, but I couldn't find my Lilo config file. Is there any way to switch back over to GRUB without reinstalling my OS?
Okay, I messed it up... I opened the terminal and typed "/sbin/grub-install /dev/hda". It said installation was successful. When I rebooted, I was greeted with the familiar grub screen that let me choose what to boot. It had DSL, 3 other versions of DSL, and the windows I added to menu.lst. Sadly, none of them work. I get the error message:

Quote:
kernal /boot/linux24 root=/dev/hda2 quiet vga=normal noapci noapm nodma noscsi
frugal
[Linux-bzImage, setup=0x1400, size=0xf17f7]
initrd /boot/minirt24.gz
Error 15: File not found.


I think I know why. Grub is still configured for when I just had a frugal install, not a full hd install. I don't know why the windows one didn't work, though. How bad is this messed up? Should I just boot into a live cd, clear the partion table on the first drive, and reinstall DSL? There's nothing important saved...

EDIT: Doh, I forgot I could mount my harddrive from the live cd. Laughing Anyway, what should the linux part of my /boot/grub/menu.lst look like?
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 3
» All times are UTC - 5 Hours
 
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

 

Advertisement