Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a debian system that's freezing in the boot sequence at "Setting system clock". Several sites I looked at recommended changing the init scripts to disallow hardware access to the clock. But, I can't boot! Is there a parameter I can pass to the kernel at boot so that it will skip init scripts?

share|improve this question
1  
Have you tried booting from a LiveCD? If that works, you can mount your drive and modify the init scripts. –  Matthew Flaschen Aug 2 '10 at 19:51

2 Answers 2

up vote 2 down vote accepted

There are two main ways of booting in a maintenance mode. Both require editing the kernel boot line in the bootloader (e.g., grub). At the end of the line that looks like kernel /vmlinuz root=/dev/sda1 ro, you can add:

  • single to skip starting most services (this boots into runlevel 1; writing 1 instead of single is synonymous); or

  • init=/bin/sh to skip absolutely everything after the mounting of the root filesystem and run a shell as the single process. This is an extremely minimal environment. Chances are that you'll want to first mount -t proc proc /proc (lots of things depend on /proc being available) and mount -o remount,rw / (the root filesystem starts out mounted read-only).

Since your problem seems to be with the hwclock invocations, which are part of the system boot, single won't help, you need to go all the way to init=/bin/sh.

Alternatively, you could boot a live CD (or USB stick) and repair your system from there.

share|improve this answer

It looks like I want runlevel 1: "Your system starts with the runlevel specified in /etc/inittab. E.g. id:2:initdefault: starts the system to runlevel 2 (Default in Debian).

You may override the default runlevel with kernel parameter. When the boot menu is displayed, select the edit option. Then locate the kernel line and append space and the desired runlevel number. E.g. "kernel /boot/vmlinuz-2.6.30 root=/dev/sda2 ro 3" would boot to runlevel 3. "

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.