View previous topic :: View next topic |
Author |
Message |
pertplus n00b
Joined: 20 Jun 2011 Posts: 40
|
Posted: Mon Dec 09, 2013 7:35 pm Post subject: Dual boot with installing gentoo FIRST |
|
|
So I installed gentoo ony my machine with standard hanbook partition scheme (sda1 boot, sda2 swap, sda3 root). But I bought an expensive video card and I feel like I need to use it in some games to justify buying it...And unfrotunately VM support for 3d is bad (or at least with my hardware it is, it seems XEN actually offers vga passthru but I need correct mobo/cpu (my cpu supports vt-x but not vt-d, my mobo doesnt support IOMMU).
So I booted up gentoo liveusb, used resize2fs to shrink my ext4 filesystem on /dev/sda3 down to 210 GB (hard drive capacity is 600 gb).
Then, I used fdisk and deleted my sda3 partition, then added a new one which was 210 GB in size, then added a fourth partition, type NTFS, to take up the remaining space.
Then I tested if everything was still working by rebooting, it booted into gentoo just fine and everything seemed to be working perfectly.
Then I booted up a windows 7 install usb stick and installed to sda4, so far so good.
Now, the issue is windows has likely overridden the master boot record, so when the computer turns on it just goes straight into windows (which by the way correctly has drive C capacity of 375GB or so).
So it seems I need to rewrite MBR, and maybe change bootable flag in fdisk. I use lilo as a boot manager. Here is what I aim to do:
1. boot gentoo liveusb, check fdisk to see if bootable flag has moved to /dev/sda4
2. If so, move bootable flag to /dev/sda1
3. mount /dev/sda3 as /mnt/gentoo, edit lilo.conf, adding:
other=/dev/sda4
label=windows
4. Run /sbin/lilo
Questions:
1. is this correct / makes sense?
2. should I also mount /dev/sda1 in /mnt/gentoo/boot before invoking lilo? What about my linux swap partition?
3. do I have to use chroot before running lilo? How would I use it, chroot /mnt/gentoo ?
Thank you very much for any replies |
|
Back to top |
|
|
nenemsis5 n00b
Joined: 23 Oct 2007 Posts: 72
|
Posted: Mon Dec 09, 2013 9:35 pm Post subject: Re: Dual boot with installing gentoo FIRST |
|
|
pertplus wrote: | So I installed gentoo ony my machine with standard hanbook partition scheme (sda1 boot, sda2 swap, sda3 root). But I bought an expensive video card and I feel like I need to use it in some games to justify buying it...And unfrotunately VM support for 3d is bad (or at least with my hardware it is, it seems XEN actually offers vga passthru but I need correct mobo/cpu (my cpu supports vt-x but not vt-d, my mobo doesnt support IOMMU).
So I booted up gentoo liveusb, used resize2fs to shrink my ext4 filesystem on /dev/sda3 down to 210 GB (hard drive capacity is 600 gb).
Then, I used fdisk and deleted my sda3 partition, then added a new one which was 210 GB in size, then added a fourth partition, type NTFS, to take up the remaining space.
Then I tested if everything was still working by rebooting, it booted into gentoo just fine and everything seemed to be working perfectly.
Then I booted up a windows 7 install usb stick and installed to sda4, so far so good.
Now, the issue is windows has likely overridden the master boot record, so when the computer turns on it just goes straight into windows (which by the way correctly has drive C capacity of 375GB or so).
So it seems I need to rewrite MBR, and maybe change bootable flag in fdisk. I use lilo as a boot manager. Here is what I aim to do:
1. boot gentoo liveusb, check fdisk to see if bootable flag has moved to /dev/sda4
2. If so, move bootable flag to /dev/sda1
3. mount /dev/sda3 as /mnt/gentoo, edit lilo.conf, adding:
other=/dev/sda4
label=windows
4. Run /sbin/lilo
Questions:
1. is this correct / makes sense?
2. should I also mount /dev/sda1 in /mnt/gentoo/boot before invoking lilo? What about my linux swap partition?
3. do I have to use chroot before running lilo? How would I use it, chroot /mnt/gentoo ?
Thank you very much for any replies |
i am using grub2 to handle dual boot. but the process is the same:
1) mount gentoo with boot cd
2) chroot
3) edit /etc/fstab
4) rewrite MBR lilo /grub2 Code: | grub2-install /dev/sda |
5) run Code: | grub2-mkconfig -o /boot/grub/grub.cfg |
6) emerge os-prober
7) reboot
8.) re-run to get also windows in boot menu Code: | grub2-mkconfig -o /boot/grub/grub.cfg |
|
|
Back to top |
|
|
pertplus n00b
Joined: 20 Jun 2011 Posts: 40
|
Posted: Tue Dec 10, 2013 2:56 am Post subject: |
|
|
Thanks for your reply. I'll check /etc/fstab though I wonder why would I need to change it, I don't need sda4 mounted automatically when I'm running gentoo, do I? |
|
Back to top |
|
|
cwr Veteran
Joined: 17 Dec 2005 Posts: 1969
|
Posted: Wed Dec 11, 2013 2:43 pm Post subject: |
|
|
You may find life easier if you use Window's boot menu to chain boot to Grub/Lilo.
I do that because my laptops have "restore" partitions for Windows, and messing
with the MBR messes up the restore process. The BCD Editor can be used to set
up a menu and make the Grub partition the default - it adds 3 seconds or whatever
to the boot time, but I don't find that a handicap.
Will |
|
Back to top |
|
|
|
|
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
|
|