Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Installing Gentoo
  • Search

Weird root and boot error

Having problems with the Gentoo Handbook? If you're still working your way through it, or just need some info before you start your install, this is the place. All other questions go elsewhere.
Post Reply
Advanced search
7 posts • Page 1 of 1
Author
Message
sntimi
n00b
n00b
Posts: 9
Joined: Mon Jun 21, 2021 9:10 pm

Weird root and boot error

  • Quote

Post by sntimi » Sat Aug 14, 2021 11:20 pm

Hello!

There is something wrong with my disk partitions... I can run and boot gentoo only when I have just one disk connected. I tried connecting a formated HDD but the Kernel ends panicking with this error: Unable to mount root fs on unknown-block (8,3).

Thank you for your time :)
Top
sntimi
n00b
n00b
Posts: 9
Joined: Mon Jun 21, 2021 9:10 pm

Re: Weird root and boot error

  • Quote

Post by sntimi » Sat Aug 14, 2021 11:21 pm

sntimi wrote:Hello!

There is something wrong with my disk partitions... I can run and boot gentoo only when I have just one disk connected. I tried connecting a formated HDD but the Kernel ends panicking with this error: Unable to mount root fs on unknown-block (8,3).

Thank you for your time :)

By the way, I tried changing the "Built-in command line" in the kernel config but it does not work
Top
mike155
Advocate
Advocate
Posts: 4438
Joined: Fri Sep 17, 2010 11:33 pm
Location: Frankfurt, Germany

  • Quote

Post by mike155 » Sun Aug 15, 2021 12:48 am

There's probably a parameter like 'root=/dev/sda2' in your kernel command line, right?

If you add a new disk, it could be that the kernel renames your disk containing the root partition to '/dev/sdb'. If that's the case, 'root=/dev/sda2' won't work.

A possible solution are 'Filesystem labels and UUIDs' and 'Partition labels and UUIDs', see https://wiki.gentoo.org/wiki/Handbook:A ... _and_UUIDs
Top
pietinger
Administrator
Administrator
Posts: 6631
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Sun Aug 15, 2021 9:17 am

What @mike155 said !

But the information in the link is for /etc/fstab ... this is for later (if the kernel has already booted). You need to set it also in the kernel command line; here is a better link for describing this: https://wiki.gentoo.org/wiki/EFI_stub

The solution is: "root=PARTUUID=..."
Top
sntimi
n00b
n00b
Posts: 9
Joined: Mon Jun 21, 2021 9:10 pm

  • Quote

Post by sntimi » Sun Aug 15, 2021 2:08 pm

mike155 wrote:There's probably a parameter like 'root=/dev/sda2' in your kernel command line, right?

If you add a new disk, it could be that the kernel renames your disk containing the root partition to '/dev/sdb'. If that's the case, 'root=/dev/sda2' won't work.

A possible solution are 'Filesystem labels and UUIDs' and 'Partition labels and UUIDs', see https://wiki.gentoo.org/wiki/Handbook:A ... _and_UUIDs
First of all, thank you for trying to help me.

So the output of blkid is:

Code: Select all

 /dev/sdb: UUID="7C97-5221" BLOCK_SIZE="512" TYPE="vfat"
/dev/sda4: UUID="e88ca318-fee1-41e5-b97d-c693049973b4" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="rootfs" PARTUUID="5ff2b05e-d8d6-428e-a5ff-9eea84326666"
/dev/sda2: UUID="B08C-797E" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="boot" PARTUUID="40300159-d096-43e9-ac8e-a7e1db1c053d"
/dev/sda3: UUID="4a08b526-fb84-4fa8-8934-9f361155ac6e" TYPE="swap" PARTLABEL="swap" PARTUUID="f32f239b-9143-4101-b7cd-db24fc301f78"
/dev/sda1: UUID="605a7cc3-f69c-40ce-8ccc-a34657088248" TYPE="swap" PARTLABEL="grub" PARTUUID="ebc05138-520f-4100-980f-0799c0160f7d"
I wrote in the "Built-in Kernel command line" this: root=PARTUUID=5ff2b05e-d8d6-428e-a5ff-9eea84326666.

And then I did "make && make modules_install". I tried to do "make install" but it show me this: sh ./arch/x86/boot/install.sh 5.10.27-gentoo arch/x86/boot/bzImage \ System.map "/boot".

Here is what I have in my fstab just in case you need it:

Code: Select all

/dev/sda2 /boot vfat defaults 0 2
/dev/sda3 none swap sw 0 0
/dev/sda4 / ext4 noatime 0 1
Something is wrong with this because the boot when I have two disks is still not working :(
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56094
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Sun Aug 15, 2021 3:02 pm

sntimi,

Kernel device names are allocated on a drive detection order.
Your original /dev/sda became /dev/sdb when you added a drive.

The hack is to swap motherboard connectors, so that your original sda is detected first. Thats not robust. You add more drives and you have to do it again.

The robust fix is to use root=PARTUUID= to define root in the kernel command line and either PARTUUID or the filesystem UUID in /etc/fstab.

The kernel built in command line may not be used. It is overridden by anything passed at boot time.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
sntimi
n00b
n00b
Posts: 9
Joined: Mon Jun 21, 2021 9:10 pm

  • Quote

Post by sntimi » Sun Aug 15, 2021 3:24 pm

NeddySeagoon wrote:sntimi,

Kernel device names are allocated on a drive detection order.
Your original /dev/sda became /dev/sdb when you added a drive.

The hack is to swap motherboard connectors, so that your original sda is detected first. Thats not robust. You add more drives and you have to do it again.

The robust fix is to use root=PARTUUID= to define root in the kernel command line and either PARTUUID or the filesystem UUID in /etc/fstab.

The kernel built in command line may not be used. It is overridden by anything passed at boot time.
I swapped connectors and now it is working!!!! Thank you so much Neddy :D :D :D
Top
Post Reply

7 posts • Page 1 of 1

Return to “Installing Gentoo”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic