LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Partition Table question (https://www.linuxquestions.org/questions/linux-newbie-8/partition-table-question-799813/)

metalfiiish 04-03-2010 03:07 PM

Partition Table question
 
Hello! I am trying to install Gentoo. Currently I have windows 7 on my primary Hard Drive.I decided to add in a second HDD that I got for free and use linux on that.I got through my entire install and at the end I accidently wrote grub to my second hard drive.When I rebooted it went straight to windows.So I have some questions. When installing to the secondary HDD does my boot partition and swap need to be on sda? or can they reside on sdb?Also I tried to re-issue the grub-install command and it said bash: command not found. How can I get grub to re-install? I tried to emerge it and same issue no command found.Do I need to redo the entire reinstall?My last question is If I have more then enough HDD space how much is too much for linux? Most people say 30 GB is all you need from what I have read but I assume 160 GB is going to go to waste? thank you for any help you can give.

sstendal 04-03-2010 03:52 PM

Hi. When you boot your pc it will first run the program loaded in the "master boot record" (MBR) on the primary disk. This is probably the first disk on your machine, and since windows is installed in the MBR on that disk it will boot windows.
What you need to do is to install GRUB in the MBR on the first disk. GRUB's configuration files can still be on the second disk, but GRUB must be installed in the MBR on the first disk. You should then configure GRUB to either load linux from the second HDD or windows form the first HDD. You can install GRUB by booting with a live linux cd and run the linux command "grub-install".

Scan2006 04-03-2010 04:03 PM

No boot/swap does not have to be on sda. You can boot up to your livecd that you used to install gentoo then mount your partitions
Code:

mount /dev/sdb3 /mnt/gentoo         
mount /dev/sdb1 /mnt/gentoo/boot

make sure to use your partition scheme

Code:

mount -t proc none /mnt/gentoo/proc
mount -o bind /dev /mnt/gentoo/dev
chroot /mnt/gentoo /bin/bash
env-update
source /etc/profile
export PS1="(chroot) $PS1"

this will chroot you into your install and you should be able to get the grub command again
as far as 160 gig being a waste that all depends what you are going to be using it for. You can make your home dir 30 gig and leave the other 130 gig to be used for whatever and just mount it were and when you want.

metalfiiish 04-04-2010 09:10 AM

alright!
 
thank you for the responses.I had to pull out the second HDD someone wanted it so now I'm going back to a single drive configuration.So if you can I have another question when I end up getting my partitions set there are 6.the first has a small NTFS that is set as bootable, I was told that when windows 7 i installed it automatically creates this for recovery, but then why is it set as bootable? the second partition is the windows 7 itself.The third is linux boot, the fourth is extended, the fifth is my swap which I set to 2 GB as I was told it's needed to be as big as your RAM so when you go into sleep/hibernation that it can store it all. My last is the linux root.Should I only have one partition set as bootable or does each OS need to be labeled bootable? (I think just the linux boot partition needs to be right?) thank you again for reading and any helpful advice.


All times are GMT -5. The time now is 01:40 PM.