[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is it possible to install GRUB (legacy) to a raw filesystem without

From: Robert Wolf
Subject: Re: Is it possible to install GRUB (legacy) to a raw filesystem without partition table?
Date: Sat, 26 Mar 2011 21:45:50 +0100 (CET)
User-agent: Alpine 2.02 (DEB 1266 2009-07-14)

Hallo Ottavio,

On Sat, 26 Mar 2011, Ottavio wrote:

> These images have no networking, no bootloader and no kernel and are
> installed as a raw filesystem with no partition table and MBR, so they
> can only be accessed via chroot.
> I have used qemu to mount two working images of Slackware 64 bit which
> was using in the past plus the fedora image. Once booted, the images
> are recognized as such;
> /dev/sda1 slackware /
> /dev/sdb1 slackware /usr
> /dev/sdc  fedora-14_x86_64
> Note the /dev/sdc instead of /dev/sdc1
> Note also that there's no grub on Slackware, only LILO.

*** What about to mount this image and copy whole content to real partition?

# mount -o loop /DOWNLOAD-DIR/fedora-14_x86_64 /mnt/fedora-14-img
# mount /dev/sdc1 /mnt/fedora-14-part
# rsync -av --numeric-ids /mnt/fedora-14-img/ /mnt/fedora-14-part/

> I have started networking on Slack and mounted Fedora
> # mount /dev/sdc /mnt
> # mount -t proc none /mnt/proc
> # chroot /mnt
> # yum install kernel
> # yum install grub
> # grub --version
> grub (GNU GRUB 0.97)
> # ls /boot/grub
> stage1 stage2 *stage1_5 splash.xpm.gz <and other files>

*** You don't have to install other boot loader, if you have already one 
installed for your slackware. You need only to configure, where the boot loader 
finds the kernel and initrd.

You can use your slackware-kernel (if it is 64bit too), otherwise you have to 
install fedora-64bit-kernel, but then you can add simply new entry in the 
slackware-boot-loader conf with correct kernel, initrd and partition 

Or, you can start some liveCD distro and install grub2 from this distro - I
did it this way with Ubuntu LiveCD to install grub2 on Windows Vista partition.

> # grub
> grub > find /boot/grub/stage1
> Error 1: File not found

*** Probably, you should mount (with bind) /dev/ into the chroot.

running-system # mount -o bind /dev /mnt/dev
running-system # chroot /mnt
chroot-system # mount /proc
chroot-system # grub

> grub > find /mnt/boot/grub/stage1
> Error 1: File not found

*** This is not correct. Grub looks for files on devices. Command find 
/boot/grub/stage1 looks in devices in the directory /boot/grub. If you have 
/boor on the separate partition, you should search for /grub/stage1.

> exited from chroot and run:

*** Hmmm, I did grub everytime from chroot and without any problem. But I 
mount-bind /dev into chroot everytime.

> # /mnt/sbin/grub
> grub > root (hd2)
> Filesystem type unknown, using whole disk

*** It means, grub did not find FS type...

> grub > setup (hd2)
> Error 17 : Cannot mount selected partition

*** ... and therefore this has no sense.

Is it not possible to boot fedora kernel with lilo?

I hope it will help you to solve your problem, at least partially, or to get 
some new ideas.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]