[Sussex] GRUB mystery

Steve Dobson steve at dobson.org
Sun Feb 18 08:00:22 UTC 2007


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.

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.

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.

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.

      # apt-get install linux-image-2.6-486

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.

5). Consider configuring a static IP address (edit /etc/network/interfaces,
    "man 5 interfaces" for more information).  If you're running DHCP,
    which most people are then when you move the disk and boot it on the
    kiosk server it will be using different network hardware and therefore
    your DHCP server (probably your ADSL router) will see it as a new 
    computer and give it a new IP address.

6). You may as well install the SSH server so you can remotely log in
    to your server.  If you've configured for a static IP this maybe
    your easiest way in after a booting on the kiosk server.

      # apt-get install openssh-server

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.

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.

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.

Steve D.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.lug.org.uk/pipermail/sussex/attachments/20070218/b27d6441/attachment.pgp 


More information about the Sussex mailing list