# Boot hangs at "setting clock via ntpdate"

## jesnow

I've never experienced such an apparently simple showstopper. 

The machine hangs at:

```
* 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.

----------

## dr_wulsen

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

If you are using systemd, append 

```
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 

```
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.

----------

## NeddySeagoon

jesnow,

Boot a live system and edit /etc/rc.conf.

Uncomment  

```
#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.

----------

## jesnow

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

```
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.

----------

## asturm

 *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.

----------

## NeddySeagoon

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.

----------

## ct85711

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.

----------

## jesnow

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.

----------

## dr_wulsen

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...

----------

## Roman_Gruber

 *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.
> ...

 

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.

---

----------

