On Sun, Dec 03, 2006 at 01:02:46PM +0200, Ira Abramov wrote:
> Quoting Yedidyah Bar-David, from the post of Sun, 03 Dec:
> > On Sun, Dec 03, 2006 at 10:39:01AM +0200, Ira Abramov wrote:
> > > I'm booting a PXE image on a node that I want to back up with partimage.
> > > I have to detect the disk it uses for it's root. right now I'm guessing
> > > it with the result of this:
> > >
> > > sfdisk -d /dev/sd? /dev/hd? /dev/cciss/???? 2>/dev/null | awk 'NR==1
> > > {print $(NF)}'
> > >
> > > is there a more correct or exact way to deduce this by asking the kernel
> > > what it would boot if PXE was not active?
> >
> > "the kernel" or the BIOS? Please be more specific about what exactly
>
> rephrase... is there a way of asking the kernel what THE BIOS would
> boot. I typed slower than my brain, of course :-)
>
> > I am not sure there is a portable, documented way to do this.
>
> crap. right now the sfdisk line above looks at common disk device names,
> and the first one it finds that has a physican device behind it, gets
> reported.
>
> I guess it will do for now.
You might also want to look at the 'install-grub' script from grub - it
somehow tries to do this, using grub to probe the BIOS.
--
Didi
=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]