Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
GRUB: Device node not found
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
mattia29
n00b
n00b


Joined: 28 Nov 2015
Posts: 6

PostPosted: Sat Nov 28, 2015 3:32 pm    Post subject: GRUB: Device node not found Reply with quote

Hi everyone,
I'm trying installing Gentoo on virtualbox at the moment, and it was going all well till I tried to install grub. At the command
Code:
grub2-install /dev/sda

it answer with a lot of
Code:
device node not found
. The partitioning scheme is:
Code:

Partition   Filesystem         Size            Description
/dev/sda1         ext2      2M               BIOS boot partition
/dev/sda2         ext2      150M           Boot partition
/dev/sda3         swap      512M             Swap partition
/dev/sda4         ext4      7.4GB           Root partition


Where is the problem? I followed the Handbook step by step.
Thank you
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7071

PostPosted: Sun Nov 29, 2015 6:02 am    Post subject: Reply with quote

You must have forgotten the mount --rbind /dev /mnt/gentoo/dev part of the chroot.
If your /dev is not populated in your chroot, grub cannot see any /dev/sda because you have no /dev/sda in your chroot.

Try redo the chroot part from start and make sure you don't forget to bind /dev before chrooting.
Back to top
View user's profile Send private message
mattia29
n00b
n00b


Joined: 28 Nov 2015
Posts: 6

PostPosted: Tue Dec 01, 2015 4:24 pm    Post subject: Reply with quote

I'm sure I've done it. However I reinstalled from zero with the difference that before I made a GPT partitioning of the virtual hd and now simply MBR. It's going fine now. How did you understand that one was the missing command?
Thank you for your help.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Tue Dec 01, 2015 8:14 pm    Post subject: Reply with quote

mattia29,

It makes little difference if you use a MSDOS or GPT partition table.
Virtualbox emulates a BIOS system so you may have an extra wrinkle or two to iron out to get it to work with GPT.

/dev (along with /proc and /sys) are not real file systems. They are kernel data structures exposed to users as file systems.
/dev is created and maintained by the kernel option DEVTMPFS. udev keeps an eye on new nodes as they are created and fixes groups, permissions and so on.

When you boot the installation media, its /dev gets created at /dev. Lots of things break if this fails.
When you mount your growing install at /mnt/gentoo, the kernel does not create /mnt/gentoo/dev and populate it for you,
That's what the bind mount does. Makes a filesystem appear in several places

When you do the chroot, from inside the chroot, everything outside becomes inacessable. Thus the install medias /dev has vanished and absolute paths like /dev are with respect to what was /mnt/gentoo.
We know that /dev/sda existed outside of the chroot because you partitioned it, made filesystems and so on.
Nothing else tries to operate on devices until you install grub. If that gives a
Code:
device node not found
error about the only thing that causes that is failing to mount /dev inside the chroot.

Reinstalling is a bad habit you learned from binary distros. Don't do it with Gentoo. It takes some skill to break Gentoo so badly that it needs no be reinstalled.
All a reinstall does is provides opportunities to make different mistakes. It also deprives you of the learning opportunity of fixing your Gentoo.
_________________
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
mattia29
n00b
n00b


Joined: 28 Nov 2015
Posts: 6

PostPosted: Fri Dec 04, 2015 11:05 am    Post subject: Reply with quote

Thank you for the exhaustive explanation.
I've just begun to use gentoo, it's my first source-based distro. So yes, I have to learn a different approach. As you said, I used to reinstall other distros to fix serious problems, now I'm curious to try the "gentoo-way".
I'm reading the handbook step by step, I hope this should be sufficient to start (probably I would open other threads for help/curiosities if needed).

So, between GPT and MSDOS, which you advice?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Fri Dec 04, 2015 5:10 pm    Post subject: Reply with quote

mattia29,

Both work. As you are doing a Virtualbox guest install an MSDOS partition table will be simpler.
Indeed, the only reasons to use GPT in Virtualbox are
a) that the guest only supports UEFI.
b) the guest HDD will be bigger than 2TiB.

There are other ways to get round b) in Virtualbox.

It is left as a exercise for the (advanced) reader to install Gentoo as a guest on a Windows host, where windows is installed on a FAT filesystem.
The problem is that FAT only supports files up to 2G and you can't install Gentoo in 2G.
You may not tamper with the Windows install in any way, so donating a raw partition to VBox is not permitted.
_________________
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
Section_8
Guru
Guru


Joined: 22 May 2004
Posts: 566
Location: Arlington, TX, US

PostPosted: Fri Dec 04, 2015 7:36 pm    Post subject: Reply with quote

NeddySeagoon wrote:
It is left as a exercise for the (advanced) reader to install Gentoo as a guest on a Windows host, where windows is installed on a FAT filesystem.
The problem is that FAT only supports files up to 2G and you can't install Gentoo in 2G.
You may not tamper with the Windows install in any way, so donating a raw partition to VBox is not permitted.

Is the answer to this, use LVM to install gentoo, and merge a bunch of 2G physical volumes into a sufficiently large logical volume?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Fri Dec 04, 2015 8:50 pm    Post subject: Reply with quote

Section_8,

Thats the second answer. I used mdadm linear raid0 to achieve the same thing.
Lots of 2G volumes stuck end to end.
_________________
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