[Sussex] GRUB mystery

Gavin Stevens starshine at gavmusic.uklinux.net
Mon Feb 19 00:14:09 UTC 2007


Steve (& all others who offered their thoughts)

On Sun, 18 Feb 2007 08:00:17 +0000
Steve Dobson <steve at dobson.org> wrote:

> Gavin
> 
> On Sun, Feb 18, 2007 at 12:41:52AM +0000, Gavin Stevens wrote:
> > I tried installing Debian Etch on the hard drive from my kiosk
> > server via my P3 machine as the kiosk server doesn't have a CDROM or
> > floppy & can't boot from USB.
> > 
> > I got DamnSmallLinux onto the kiosk server in this way & it worked
> > fine. Also, my P3 machine has Etch on its own hard drive & it
> > installed & works perfectly.
> > 
> > However, when attempting to install Etch onto the kiosk server's
> > hard drive, GRUB failed to install every time ("failed to install to
> > /target/" was the message if I recall). I tried clearing the hard
> > drive in every way available in the partitioner, but it did nothing
> > to change the result.
> 
> When Debian is installing itself "/target/" is the root of the new 
> installation, as you don't give details of how you've configured your
> hardware so I guess that there is something wrong with the way you've
> plugged stuff in.

I'll check it, but this method worked before with DamnSmallLinux.
> 
> The great thing about Linux is that you can just move disks around 
> systems so long as the kernel that boots supports the CPU.  Given the
> availability of x86 CPUs these days I think it is worth having the 
> lowest common denominator kernel installed so you can just move the
> disk to a new machine if you need to (like if the motherboard dies).
> 
> As I know you've installed Linux many times before I won't give
> details full details, but here how I've done it in the past.
> 
> 1). On your install machine (P3 for you) make sure that the disk is
>     configured as Master on the primary IDE bus.  This is where it is
>     going to be when you plug it in the kiosk server, so that is where
>     it MUST be when installing.

The HDD from the kiosk server is master on primary IDE on the P3 machine
- the P3 machine's own HD is physically disconnected at present.
> 
> 2). Install as normal except deselect all options in the Task Select
>     phase.  You are going to be moving the disk so you probably
>     haven't got the same graphical hardware on the P3 as you have on
>     the kiosk. This means that you have to be comfortable with the
>     CLI.  You could pick one of the server options if you want, but I
>     find it easier  to just apt-get install the software I need later.

I used "expert" mode & the text based installer to install Etch. I also
deselected all the options in tasksel. However, when I did make a
selection, the install process seemed to hang indefinitely (problem with
the mirror, perhaps?)

> 
> 3). Let the disk reboot where it is.  In days of old Debian use to
> install
>     a safe, run anywhere kernel and you picked a better one for your
>     system later.  Now they detect the CPU type during installation
>     and only install the best kernel for that CPU.  You're moving the
>     disk to new hardware, so it is best to have a common CPU kernel
>     that  will boot on any x86 hardware.

In expert mode I was able to select the 2.6.17-2-486 kernel. If Grub had
installed, I would have let the disc reboot in the P3 before moving it,
just to be sure.
> 
> 
> 4). Are you running the kiosk headless or are you going to plug in a 
>     screen & keyboard (possibly via a KVM)?  If running headless then
>     it is worth configuring for serial console.  You need a null modem
>     cable but that's a lot cheaper than using a KVM if you don't
>     already have one.  I'll not give details here (it will double the
>     size of  this post), but just say if that's what you want and I
>     provide  details, there is only about three files to edit.  But it
>     if you're going to go serial console you should test it before
>     moving the disk when you have got a keyboard and screen connected
>     and working.

The kiosk server runs with a screen & keyboard via a KVM switch, so once
Grub is installed & working, I will manually install X & related things.
> 6). Shutdown, poweroff and then reboot where the disk is to double
> check
>     everything works as expected.  Nothing worse than moving to the
>     new hardware, booting and then finding you've forgotten something
>     and having to move the disk back again.  And I would recommending
>     plugging the  install system (P3) back together until the kiosk
>     server is up and working.

The P3's own HD will be reconnected very soon, as I don't want to be
missing out on Etch.
> 
> 7). Now shutdown and move the disk.  If it boots and you can log on
> great!
>     If you can't go back to step 3 and try and fix the problem.
> 
> 8). Now install the software you want for the kiosk server.  If you
> have
>     another machine on the network and can SSH into the kiosk server
>     and play.
> 
> 9). Take a look at the content of /proc/cpuinfo.  This will report
> what
>     the kernel knows of the CPU it is running on.  There maybe a
>     better kernel for you.

Ah! Thanks for that - I'll take a look just as soon as Grub installs & I
can boot.

I'll double check everything (the kiosk's hard drive is in the P3 via a
2.5-3.5" adapter) & try again.
> 
> Anyway, have fun and I hope this helps.  If not bring the kiosk system
> with  you on Thursday.  I will be bring my system for my talk on "The
> Joy of X" and I happen to have a Debian mirror on it so I may be able
> to get it working.

Thanks Steve - if I can't get it working, I may just have to take you up
on that kind offer. I'll find my crossover cable just in case.

Gavin.




More information about the Sussex mailing list