Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Gentoo External-HD Stage5 Install w/ sdb Grub/Fstab ??
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
Muzikianz
n00b
n00b


Joined: 02 Jul 2013
Posts: 2

PostPosted: Tue Jul 02, 2013 12:40 am    Post subject: Gentoo External-HD Stage5 Install w/ sdb Grub/Fstab ?? Reply with quote

I am four months into the Gentoo OS. I posting to this board in the hope that someone will help me with some issues in am facing
in Gentoo.

Since it was with great difficulty that I was able to install & boot into a graphical desktop environment, now that I have had success with Gentoo/Gnome, I wish to do a Stage5 install of my sda partition onto my sdb external hard-drive partition for testing alternate configurations of Gentoo.

I have read a great deal in the Gentoo forums, but do not rightly understand how to properly setup grub, fstab, and boot of my, "external hard-drive."


Gentoo Questions:


1. If I boot into my USB/Firewire 400 external hard-drive partition, how must I alter my Grub & Fstab files? If once booted all my machine sees is my external hard-drive, can't I just leave my grub/fstab files just the way they are (Stage5 install)? . . . Or, do I have to change both files to reflect that
I have interfaced an /dev/sdb device to my machine?

2. In my grub file, it reads, ... "root (hd0,0)." How do I re-write this to reflect my external hard-drive?

3. Do I leave fstab the way it is, or do I have to alter it to reflect my external HD device?

4. Should I use the LiveUSB HowTo method of making my External HD "BOOTABLE", ...before, ... or after I do theStage5 transfer onto my External HD.

5. I am currently using USB 2.0 for data transfers between my External HD -&- my PC machine. I will be using Firewire 400 soon for data transfer. Does Firewire 400 effect GRub/Fstab configuration in any way?

Thanks in advance. -Have a great day! :)


My Grub file looks like this:

Code:
title Gentoo Linux 3.8.13
root (hd0,0)
kernel /boot/kernel-genkernel-x86_64-3.8.13-gentoo real_root=/dev/sda3
initrd /boot/initramfs-genkernel-x86_64-3.8.13-gentoo



My Fstab file lloks like this:
Code:
/dev/sda1     /boot              ext2     noauto,noatime    1 2
/dev/sda3     /                  ext4     noatime           0 1
/dev/sda2     none               swap     sw                0 0

/dev/cdrom    /mnt/cdrom     auto      noauto,ro            0 0


***sorry for the jumbled formatting of fstab, ... can't seem to get it to format the way it was typed.

code tags added to fix formatting by NeddySeagoon
Back to top
View user's profile Send private message
BradN
Advocate
Advocate


Joined: 19 Apr 2002
Posts: 2391
Location: Wisconsin (USA)

PostPosted: Tue Jul 02, 2013 6:18 pm    Post subject: Reply with quote

I assume you don't want to switch boot devices with BIOS, but rather have it all linked in your main grub menu?

Reboot, go to the grub command prompt, and experiment a bit.

For example, use a command like:

cat (hd1,0)/

with tab completion and you should see if it is mounting that drive. This depends on the BIOS making a USB drive available when it's not being booted. If it works, you can add boot entry items using that hard drive identifier.

If you want the external drive bootable, you should make the assumption that it shows up as (hd0,0) when set as the first boot device.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43192
Location: 56N 3W

PostPosted: Wed Jul 03, 2013 6:24 pm    Post subject: Reply with quote

Muzikianz,

Welcome to the forums.

Much of what you want to do need to be answered with "it depends on your BIOS". That means some trial and error is needed.
Your BIOS may renumber the drives when the USB drive is the boot drive. This is a pain because it will be sdb when you install grub but sda when you boot from it.
This makes installing grub difficult.
If setting the USB drive as the boot drive in the BIOS gets you as far as the grub menu, you are good.

There are extra problems booting from a USB disk as the kernel tries to mount root before the USB subsystem is initialised, so your USB connected root filesystem is not there. You fix that by adding rootdelay=<seconds> to the kernel line in grub.conf. Values for <seconds> between 7 and 30 are known to work. This allows the USB subsystem to be started before the kernel goes looking for root.

What you need in your fstab depends on your drive ordering ... it might just work.

You could also move to using the UUIDS in fstab, then the kernel device names don't matter, e.g., my /home is on its own partition and its entry in /etc/fstab is
Code:
UUID=8d5d5691-ceb7-4e58-bed3-28803cb88bfe /home                   ext4  noatime         1 2

The
Code:
blkid
command will show you all of the UUIDs for your block devices.
You may even be able to use something similar for root= in grub.conf but that needs support in your initrd. I'm not sure if genkernel provides that or not.

Hint: you probably want to change the hostname on the USB drive so there is no doubt about the drive you are booted from.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Muzikianz
n00b
n00b


Joined: 02 Jul 2013
Posts: 2

PostPosted: Sun Jul 14, 2013 4:40 pm    Post subject: Reply with quote

Thank you so much for the advice. It is most appreciated. It has been a case of many trials; mostly errors. But the more I try, the more I'm tending to think in, "Gentoo." Gentoo is most challenging, and, all-in-all, I have found it to be very interesting. :D

A Stage5 install seemed to me to be the best way to clone my Gentoo install on an external HD, to experiment without worry of wrecking my Gentoo install on my internal hard drive.

One thing that has me stumped though. I added firewire support to the kernel, but when I rebooted with a firewire 400 cable connected to my external HD, Gentoo would no longer boot. I could not even get my grub boot menu to render. I then switched cables back to an USB cable, and the same thing happened no boot/no grub menu. I had to do a complete re-install. -Seems as though USB will only work for me in installing Gentoo on an external HD.

Anybody have any thoughts as to why Firewire wrecks my install on my external HD?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43192
Location: 56N 3W

PostPosted: Sun Jul 14, 2013 4:56 pm    Post subject: Reply with quote

Muzikianz,

Depending on your BIOS, connecting external drives prior to boot may reorder your internal drives too.
The change is not permanent, unplugging the external drives fixes the problem.

If your internal drive became drive 2, then the BIOS would look at the wrong drive for Grub, then its all down hil from there.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
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