[sclug] ubuntu runlevels from grub

Tom Carbert-Allen tom at randominter.net
Fri Feb 1 20:53:35 UTC 2008


It's not pretty but then again running MS OS never is.

Basicly it's a recovery partition system for the Windows XP part of a 
dual boot machine

You can boot from grub:

WinXP
Linux
Linux minimal non-interactive which just dd's a backup over winxp partition
Linux minimal non-interactive which dd's winxp partition to backup 
incase we want to update it

I have also set grub to alternate boot the first two so pleb XP users 
get a fresh machine every boot up, the second two are password protected 
for my usage.

Think of it as non-persistant disks type affair which you get in vm 
solutions

Make sense? or can you think of a better way of preventing accumilation 
XP crap?

TCA



Dickon Hood wrote:
> On Fri, Feb 01, 2008 at 20:15:42 +0000, Tom Carbert-Allen wrote:
> : well it seems the message i sent earlier (see below) was from my other 
> : account so wasn't accepted to the list (???) but i have solved the 
> : problem now anyway.
>
> : I wrote some scripts I wanted to fire off from the grub menu by using 
> : the old way of passing a runlevel number at the end of the line, but it 
> : appears upstart (the replacement for init) only detects "single" or 
> : defaults to runlevel2 (2-5 look the same to me on server anyway, and 
> : even have a comment they are only there for compatability)
>
> Umm.  I cannot for the life of me think why on earth you'd ever want to do
> such a thing.
>
> Can you enlighten me as to what you're doing this for?  It all seems
> horribly odd to me.
>
> : After banging my head against the wall trying to figure it out I 
> : realised the above about upstart ignoring runlevels. I considered fixing 
> : it up pushing it upstream but being friday night i'm not writing 
> : polished enough code for that.... So instead i just stuck my script in 
> : runlevel 2, cat /proc/cmdline, look for my triggers (which are now words 
> : rather than single digit runlevels) and case to fire off the stuf i 
> : want. Much better solution.
> : 
> : TCA
> : 
> : 
> : Previous message:
> : 
> : 
> : I feel like i've gone stupid,
> : 
> : In the past I have setup init based machine where I simply pass a 
> : runlevel to the kernel by adding the number on the end of the grub 
> : kernel line, so I can fire off an automated process from grub with a 
> : reboot at the end and return to my main interactive runlevel.
> : 
> : I have just tried this with Ubuntu running 2.6.20-15-server defualt 
> : kernel and it seems to totally ignore it no matter what I do. What am I 
> : doing wrong? Does upstart need sending the signal in a different way?
> : 
> : I have looked around on the web a bit but all the hits seem to be about 
> : people wanting to turn X on or off and the replies are always to change 
> : the default runlevel.
> : 
> : Thanks for your comments,
> : 
> : TCA - slowly converting to Ubuntu.....
>
>   



More information about the Sclug mailing list