Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Boot hangs at "setting clock via ntpdate"
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
jesnow
Guru
Guru


Joined: 26 Apr 2006
Posts: 588

PostPosted: Tue Nov 08, 2016 4:23 pm    Post subject: Boot hangs at "setting clock via ntpdate" Reply with quote

I've never experienced such an apparently simple showstopper.
The machine hangs at:
Code:
* Setting clock via the NTP Client 'ntpdate'


This occurred during an upgrade of course, so my system is in an undefined state, somewhere between
KDE 4 and KDE 5. Kernel 4.4.6 (I know, old, I want to upgrade that as well).

How can I kill this init script? SSH is not running yet, I checked.
MagicSysRq is not enabled, I checked that too.

I need to use the lilo boot screen to get to a runlevel where I can delete ntpdate, but how?

Any help gratefully received.

Jon.
Back to top
View user's profile Send private message
dr_wulsen
n00b
n00b


Joined: 21 Aug 2013
Posts: 66
Location: Beautiful Austria, Lake area in Upper Austria

PostPosted: Tue Nov 08, 2016 6:44 pm    Post subject: Reply with quote

i'm using grub, but with lilo you can sure edit the boot command line by some command.

If you are using systemd, append
Code:
systemd.unit=rescue.target
to you kernel command line (linux=blah parameters=foo systemd.unit=rescue.target).
This will take you directly to an emergency shell.

Using OpenRC, appending
Code:
emergency
to the parameters should do the same.

That thread on appending boot options to LILO is quite old, but should still be valid: http://unix.stackexchange.com/questions/51846/is-it-possible-to-pass-kernel-parameters-in-the-lilo-boot-prompt

I don't have OpenRC no more, but the systemd method works, I could confirm it on my system before posting my answer.

Edit: First tried emergency.target and it would boot, but systemctl wouldn't work.
Using rescue.target it did work and I could disable/enable services to my likings.
_________________
There's no stupid questions, only stupid answers.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Tue Nov 08, 2016 7:08 pm    Post subject: Reply with quote

jesnow,

Boot a live system and edit /etc/rc.conf.
Uncomment
Code:
#rc_interactive="YES"
The default is "NO"

When you boot next you will be able to control service startups individually.

Look for the "Press I ..." message.
_________________
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
jesnow
Guru
Guru


Joined: 26 Apr 2006
Posts: 588

PostPosted: Tue Nov 08, 2016 8:53 pm    Post subject: Reply with quote

Both wrong.

I can't boot a livesystem because my only cd writer is attached to the machine that won't boot. This seems to be the default solution for gentoo, kind of like when mac gurus tell you to turn the computer off and on again just in case.

I can't edit *anything* in the config files because the machine won't boot.

I use lilo, not grub, so grub advice is not useful.

What I can do is give the runlevel in lilo as the only argument to the selected kernel, in my case

Code:
boot: 4426 1


Does the trick and gives me a login prompt that doesn't hang at setting the #$@$% clock.
then I can remove ntp-date from the default runlevel and I'm back in business.

Now on to fix my other problems. Why is ntp-client suddently hanging my machine? Why doesn't it time out and continue? IDFK.

jon.
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 6880
Location: Austria

PostPosted: Tue Nov 08, 2016 9:48 pm    Post subject: Reply with quote

jesnow wrote:
I can't boot a livesystem because my only cd writer is attached to the machine that won't boot. This seems to be the default solution for gentoo, kind of like when mac gurus tell you to turn the computer off and on again just in case.

Why so bitter? We also have live systems on USB sticks these days.
_________________
backend.cpp:92:2: warning: #warning TODO - this error message is about as useful as a cooling unit in the arctic
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Tue Nov 08, 2016 10:17 pm    Post subject: Reply with quote

jesnow,

Put systemrescuecd on a USB stick. Its Gentoo based, you will feel right at home.

lilo loads everything using block lists. The block lists are written when you run /sbin/lilo.
There is no opportunity to intervene in the boot process as you can with grub. Lilo doesn't work that way.

Once you edit /etc/rc.conf, it can stay edited as the change is harmless.
_________________
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
ct85711
Veteran
Veteran


Joined: 27 Sep 2005
Posts: 1694

PostPosted: Tue Nov 08, 2016 10:53 pm    Post subject: Reply with quote

One thing to keep in mind on ntp is that it depends on having an internet connection. So if your network cards isn't up (with an IP address) before ntp, then it's going to keep trying before it eventually times out.
Back to top
View user's profile Send private message
jesnow
Guru
Guru


Joined: 26 Apr 2006
Posts: 588

PostPosted: Tue Nov 08, 2016 11:56 pm    Post subject: Reply with quote

Bitter because I have booted this machine just once from a cd 5 years ago: I shouldn't EVER have to do that.

Why did a hung init script cause a system hang?
Why did it not time out? It used to do that.
Why did ntp-client hang? Who can I report it to?

You can indeed pass boot parameters through LILO, as I just demonstrated. It booted right into runlevel 1 and off I went.
Back to top
View user's profile Send private message
dr_wulsen
n00b
n00b


Joined: 21 Aug 2013
Posts: 66
Location: Beautiful Austria, Lake area in Upper Austria

PostPosted: Wed Nov 09, 2016 6:08 am    Post subject: Reply with quote

it works with lilo too, as it's a kernel parameter. not related to bootloader, only the bootloader determines the way how you append the parameters.

please work on your niceness towards the people trying to help or they will back off from you. community is free and voluntary, not a service you pay for...
_________________
There's no stupid questions, only stupid answers.
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3806
Location: Austro Bavaria

PostPosted: Wed Nov 09, 2016 12:26 pm    Post subject: Reply with quote

Quote:
Bitter because I have booted this machine just once from a cd 5 years ago: I shouldn't EVER have to do that.

Why did a hung init script cause a system hang?
Why did it not time out? It used to do that.
Why did ntp-client hang? Who can I report it to?

You can indeed pass boot parameters through LILO, as I just demonstrated. It booted right into runlevel 1 and off I went.


no idea on nce from a cd 5 years ago: I sho

when you refer to install from an optical drive, it is just a way to go.. no idea what oyu refer to

Why did a hung init script cause a system hang?

when you read carefully eselect news, have a basic knowledge your init should never hang when you do not use systemd. There were several warnings including myself to stay away from systemd in this forum. When you ride a bomb and it explodes do not make a fuss !

Why did it not time out? It used to do that.

Probably no network connection, bad configuration and such

as said rc-parallel to yes, so nothing may block the bootup process. Its a very very old parameter for init in gentoo. As said misconfigured box.

Why did ntp-client hang? Who can I report it to?

No network, it may hang. I wonder where you have had this service aligned to? to the boot runlevel or to the default runlevel? what is in the config files. ntp had issues on my dial up box, i use an adsl modem where the modem basically dials up the connection, it is not a permanent network connection as most boxes have these days.

You can indeed pass boot parameters through LILO, as I just demonstrated. It booted right into runlevel 1 and off I went.

So when it booted in init 1, where is the problem? Fix the config file with rc-update / or / unmerge ntp software / or / edit the config file / or / ....

i do not see a problem when you are able to boot in init 1. thats awesome.


https://en.wikipedia.org/wiki/Runlevel

Quote:
1 Single-user mode Mode for administrative tasks.[2][b]


--

Generic Advise:

Always keep a medium on your shelf to boot up your hardware with instructions.

--

explained in detail, skip when you know how to! ...

in my case: Asus g75VW notebook, second hand. has issues that it forgets randomly after some weeks the uefi boot entries.
Therefore i have a sysrescue-cd with written commands on the paper of the disc on my shelf. plug in, type from the paper and done

Do not buy hardware without optical drive, or have an usb optical drive ready with medium, or an usb bootable medium.

same as in the old days as the floppy drive was removed and heck how do i install that nasty windi operating system ... history repeats

In my early gentoo days, i had several papers of the gentoo handbook printed out next to my recovery media. especially the pages about how to changeroot, mount and that stuff... Was the time without a second computer, was the time without a smartphone. i have a smartphone for 3 years only...

Test out how to work with a recovery medium. Some do not work.

also using your smartphone to bootup with recovery media, only a few work... => android => drivedroid...

When I remember back in the days, computer always made a fuss and having installation medium, recovery media at hand was always the case ...

--

last time a guy asked me on how to make a bootable usb. and i said you need a working windows installation probably to make a bootable windows usb installation media.

thinking about it, usb makes things complicated. the optical drive is just easier and much slower.

---
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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