Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
New installation doesn't *quite* boot
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
dkasak
n00b
n00b


Joined: 10 Feb 2012
Posts: 61

PostPosted: Thu Mar 02, 2017 11:05 am    Post subject: New installation doesn't *quite* boot Reply with quote

Hi all.

I'm a long-term Gentoo user, currently migrating a laptop from Sabayon to Gentoo ( I needed to get installed on a laptop *immediately* ). My installation method is slightly non-standard, but should have worked:

1) Make a /mnt/gentoo directory inside an running Sabayon system.
2) Continue installation as if /mnt/gentoo is a mounted partition ... ie mount proc, sys, dev, etc into /mnt/gentoo, chroot into it, configure, and emerge @world - following the additional instructions for systemd. I'm pretty OK with the whole process.
3) Reboot from a USB disk
4) Mount old Sabayon partition
5) Move everything from / into /sabayon
6) Move everything from /sabayon/mnt/gentoo into /
7) Unmount and reboot

I shouldn't have to touch my grub setup.

So when I reboot and select a kernel, I get the Sabayon boot splash screen ( custom kernel built with genkernel-next ), and the boot progress bar *slowly* moves. This laptop has an SSD, so it should be basically instant. Booting then appears to hang.

If I hit CTRL-ALT-F2, I can log in as root, but not much is working. systemd appears totally non-functional. I can't start any services or get the status of any services - they all say the command exited with an unknown error. If I try journalctl, it says there are no logs. I can start X ( I built gnome in the chroot environment ), but the keyboard and mouse are non-functional, and gnome doesn't start - I get a dialog asking for my password to unlock my keyring, and I'm stuck there.

If I instead hit Enter ( ie instead of CTRL-ALT-F2 ), there's a message saying login failed, and asking for my root password for maintenance. I can log in - but again, can't do much. If I hit CTRL-D to 'continue', the system appears to hang.

If I boot without the 'quite' and 'splash' options in grub, I can see that most boot services appear to be starting correctly - other than boot.mount or mount.boot or something ( which I assume is not critical ). Nothing else stands out. The last messages logged to the console are kernel messages about setting up bluetooth. Nothing is being logged to /var/log. Nothing appears to be wrong in dmesg output.

Does anyone know what's gone wrong? How can I diagnose this?

Luckily I can switch back to the 'working' ( entropy died, which is another story ) Sabayon installation by switching around the directories I changed in steps 5) and 6) ...
Back to top
View user's profile Send private message
DawgG
l33t
l33t


Joined: 17 Sep 2003
Posts: 814

PostPosted: Thu Mar 02, 2017 5:11 pm    Post subject: Reply with quote

check the perms of / (i did a similar thing once and they were wrong (had done everything as root before) and nobody but root could log in because of this).
is your directory-structure really functional and everything mounted (/etc/fstab)?
have you added all the necessary services with rc-update (or whatever systemd's cmd is) inside the chroot (boot.mount might be quite important)?
if you use btrfs you could use two different installations in different subvols - might make some stuff easier.
GOOD LUCK!
_________________
DUMM KLICKT GUT.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Thu Mar 02, 2017 8:03 pm    Post subject: Reply with quote

dkasak,

Do you have identical kernels built with identical versions of gcc in Sabyon and Gentoo?

If not the Gentoo and Sabayon kernel modules in /lib/modules will differ and the kernel will refuse to load them.
Look in dmesg for version magic errors.

If you want to use the same kernel in both places, you need to copy /lib/modules/`uname -r`/ from sabyon to 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
dkasak
n00b
n00b


Joined: 10 Feb 2012
Posts: 61

PostPosted: Fri Mar 03, 2017 4:19 am    Post subject: Reply with quote

DawgG wrote:
check the perms of / (i did a similar thing once and they were wrong (had done everything as root before) and nobody but root could log in because of this).


Hi. Thanks for the response. The permissions look good to me. Same as the permissions from a 'regular' install - ie after unpacking the stage-3 tarball.

DawgG wrote:
is your directory-structure really functional and everything mounted (/etc/fstab)?


Yes I copied my /etc/fstab from Sabayon, as the partition layout is identical.

DawgG wrote:
have you added all the necessary services with rc-update (or whatever systemd's cmd is) inside the chroot (boot.mount might be quite important)?


Yes AFAIK there is nothing in particular to do for systemd. I've never had to do anything, anyway.

DawgG wrote:
if you use btrfs you could use two different installations in different subvols - might make some stuff easier.
GOOD LUCK!


Thanks. Yeah I usually use btrfs, but I've been developing for Greenplum, and it apparently refuses to run on anything other than XFS :/
Back to top
View user's profile Send private message
dkasak
n00b
n00b


Joined: 10 Feb 2012
Posts: 61

PostPosted: Fri Mar 03, 2017 4:22 am    Post subject: Reply with quote

NeddySeagoon wrote:
dkasak,

Do you have identical kernels built with identical versions of gcc in Sabyon and Gentoo?

If not the Gentoo and Sabayon kernel modules in /lib/modules will differ and the kernel will refuse to load them.
Look in dmesg for version magic errors.

If you want to use the same kernel in both places, you need to copy /lib/modules/`uname -r`/ from sabyon to gentoo.


Hi. Thanks for the response. Yes I'm running a custom kernel ( latest realtime - for music recording + production ). I'm using the exact same kernel, and I've copied my /lib/modules/* across to Gentoo and run "depmod -a".

The kernel seems happy. But *something* doesn't continue. I'm thinking it's a systemd issue, but I don't have much experience in that area - it either works or it doesn't.
Back to top
View user's profile Send private message
DawgG
l33t
l33t


Joined: 17 Sep 2003
Posts: 814

PostPosted: Fri Mar 03, 2017 11:38 am    Post subject: Reply with quote

i'd compile a kernel in the gentoo-system just to make sure (and then maybe recompile and reconfigure systemd).
if you can login and (manually) run the programs of the services systemd can't/won't start i'd say it's definitely a systemd-problem (but i do not use systemd so i don't know any specifics)
GOOD LUCK!
_________________
DUMM KLICKT GUT.
Back to top
View user's profile Send private message
dkasak
n00b
n00b


Joined: 10 Feb 2012
Posts: 61

PostPosted: Sat Mar 04, 2017 11:18 pm    Post subject: Reply with quote

Thanks everyone for the tips. I've gotten things working :)

It turned out to be an issue with mounting /boot, which apparently puts the system in 'emergency' mode. It was very helpful to do the following to my grub kernel command line:

- remove 'splash'
- remove 'quiet'
- add systemd.dump_core=true
- add systemd.log_level=debug
- add systemd.log_target=kmsg

Anyway, I had *changed* the entry in /etc/fstab for /boot ... for some reason. It was late - I'm not sure what I was thinking.[/list]
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sun Mar 05, 2017 9:03 am    Post subject: Reply with quote

dkasak,

/boot is not needed to be mounted to boot the system.
Everything that is needed from /boot is read before the kernel is initialised, so /boot is not normally mounted in 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
dkasak
n00b
n00b


Joined: 10 Feb 2012
Posts: 61

PostPosted: Mon Apr 24, 2017 3:53 am    Post subject: Reply with quote

I absolutely guarantee you that fixing my /etc/fstab solved my issue.
Back to top
View user's profile Send private message
The Doctor
Moderator
Moderator


Joined: 27 Jul 2010
Posts: 2576

PostPosted: Mon Apr 24, 2017 5:26 am    Post subject: Reply with quote

Sorry to jump in at the 11th hour with this, but from experience if you know what you are doing you can just use portage to remove the Sabayon overlay and all packages installed from the overlay, update, and run. However, again from experience, this process takes about as long as installing Gentoo from a stage3. I tried it to see if I could do it :)

And if I may suggest that the cause of the mysterious fix that shouldn't have worked is likely the result of Systemd trying to do too much.
_________________
First things first, but not necessarily in that order.

Apologies if I take a while to respond. I'm currently working on the dematerialization circuit for my blue box.
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