Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED]Is initrd needed?
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
dvdma
n00b
n00b


Joined: 07 Dec 2012
Posts: 13

PostPosted: Fri Dec 07, 2012 2:40 pm    Post subject: [SOLVED]Is initrd needed? Reply with quote

Hi, this is my first question.
I have an old computer (with old bios in particular) without internet connection.
I installed Gentoo on an external hard disk (ADATA CH11 500GB) on the third partition. I want the first to be recognisable by Windows, so it is formatted in NTFS (125 GB).
The problem is that if I install grub o grub2 it won't read the second or the third partition, where I would put the kernel or grub2 files because BIOS is too old.
So I installed grub and the kernel in the partition of a usb pendrive 4GB. In this way it loads the kernel, but then I get a panic; the kernel says that it can't find the device pointed by the UUID which I set the root parameter of the kernel to in grub.conf (which should point to the 3rd partition of the ADATA). Debian installed in the 2nd partition, which also has the kernel in the pendrive and couldn't be loaded without it, has an initrd (in the pendrive too).
In conclusion (after a lot of words :oops: ) I'm asking if I should have an initrd also for Gentoo.
Thanks you in advance


Last edited by dvdma on Mon Dec 10, 2012 1:46 pm; edited 1 time in total
Back to top
View user's profile Send private message
BillWho
Veteran
Veteran


Joined: 03 Mar 2012
Posts: 1600
Location: US

PostPosted: Fri Dec 07, 2012 2:56 pm    Post subject: Reply with quote

dvdma,

You'll need an initramfs if you want to use UUID in your grub.conf.
_________________
Good luck :wink:

Since installing gentoo, my life has become one long emerge :)
Back to top
View user's profile Send private message
dvdma
n00b
n00b


Joined: 07 Dec 2012
Posts: 13

PostPosted: Fri Dec 07, 2012 2:59 pm    Post subject: Reply with quote

ok, thank you so much, I'll try. If I set the param to /dev/sda3 (for example) it will work without?
Back to top
View user's profile Send private message
BillWho
Veteran
Veteran


Joined: 03 Mar 2012
Posts: 1600
Location: US

PostPosted: Fri Dec 07, 2012 3:18 pm    Post subject: Reply with quote

dvdma

You have to use /dev with no initramfs - however I'm booting a testing installation on /dev/sdb and it would not boot without the initram :?

I think you'd be better off using it.
_________________
Good luck :wink:

Since installing gentoo, my life has become one long emerge :)
Back to top
View user's profile Send private message
TheFunk
n00b
n00b


Joined: 24 Mar 2012
Posts: 8

PostPosted: Sat Dec 08, 2012 8:13 pm    Post subject: Reply with quote

You could always go without one and use block ids or whatever it is that Grub tells you is "unreliable". Just force the install of Grub and the system will boot using OpenRC per usual, no initramfs required. However, as BillWho stated, it would be a better idea to just install an initramfs. I never use one simply because it makes the system boot slower, but one day I imagine that will cause me some problems. I'm prepared for what may come though. XD
_________________
Just kinda doin' my own thing...


Last edited by TheFunk on Sun Dec 09, 2012 1:11 am; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sat Dec 08, 2012 8:34 pm    Post subject: Reply with quote

dvdma,

No initrd is needed provided the following are true:-
1. The root filesystem must also contain /usr and /var
2. Everything needed to mount root must be built into the kernel, not as modules
3. You must use the kernel device name for the root filesystem in the root= parameter in the kernel line in grub.
4. The kernel must be located in an area of the HDD that the BIOS can read (that's a requirement anyway)

With Gentoo on an external HDD you have an extra challenge. I assume the external HDD is USB?
The USB subsystem is not normally started until after root is mounted. This is a very bad thing for root on USB.
The kernel line needs rootdelay=7 so that the kernel waits (in this case 7 seconds) before trying to mount root. During this wait, the USB system is started and the kernel can see the rppt filesystem when it goes looking. You may need need a higher value than 7.
_________________
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
drwook
Veteran
Veteran


Joined: 30 Mar 2005
Posts: 1322
Location: London

PostPosted: Sat Dec 08, 2012 11:00 pm    Post subject: Reply with quote

Do you have no internal hard drive, and no ability to add one? root on external/removable media doesn't sound ideal...
Back to top
View user's profile Send private message
chithanh
Developer
Developer


Joined: 05 Aug 2006
Posts: 1668
Location: Berlin, Germany

PostPosted: Sat Dec 08, 2012 11:25 pm    Post subject: Reply with quote

If your hard disk is GPT partitioned, you can use root=PARTUUID=... even without initramfs.
Back to top
View user's profile Send private message
dvdma
n00b
n00b


Joined: 07 Dec 2012
Posts: 13

PostPosted: Mon Dec 10, 2012 1:12 pm    Post subject: Reply with quote

drwook, I have 2 internal hard drives, but I don't own them, and the owner doesn't let me use them even to setup a bootloader (I know, its a stupid situation)
NeddySeagoon and chithanh, I'll try your solution and I'll let you know, thanks.
Just setting the root parameter to /dev/sda3 (or whatever) indeed didn't work, and the kernel couldn't list me any available partition.
If both won't work, I'll use the initramfs, but I wanted too a faster boot
Back to top
View user's profile Send private message
dvdma
n00b
n00b


Joined: 07 Dec 2012
Posts: 13

PostPosted: Mon Dec 10, 2012 1:20 pm    Post subject: Reply with quote

NeddySeagon, appending the rootdelay parameter worked!! Now i got other errors (the system tries to load kernel modules from the wrong directory) but I should be able to fix them alone
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