logoalt Hacker News

checker659yesterday at 3:19 PM2 repliesview on HN

Pass init=/bin/sh or what have you in GRUB cmdline


Replies

tostiyesterday at 5:32 PM

Traditionally,

    init=/etc/rc
And have that be a shell script which starts whatever you need. You'll probably want fsck in there, mount -a, some syslogd, perhaps dbus, some dhcp client, whatever else you need, and finally the getty which is probably a good idea to respawn after it exits. That's usually the job of init so you could well end your rc with exec /sbin/init
opelloyesterday at 7:49 PM

I'm sure it's useful elsewhere, but I have used this for years to debug embedded Linux environments, it's such a handy tool.