Showing posts with label bootloader. Show all posts
Showing posts with label bootloader. Show all posts

Monday, July 30, 2007

Install Slackware from ISO file with grub or lilo

pre-requirement:
- already have Linux or BSD-based (FreBSD) system installed on harddisk before using grub or lilo as bootloader.
- Slackware's iso image on your harddisk.
- at least one partition prepared for your slackware system

Here are step by step:
1. Extract kernel and initramfs image's file (initrd.img) that come from slackware's iso image (you can mount it first to get both file). The location for kernel file is in /kernel directory and initramfs file is in /isolinux directory. Then, copy both file into /boot directory in your linux/FreeBSD system.

2. Configure your linux/FreeBSD grub or lilo for including slackware's kernel and initramfs file (initrd.img).
Add this entry into /boot/grub/menu.lst if using grub:
title Slackware-12.2 Install
kernel /boot/[your-slackware-kernel]
initrd /boot/[your-initramfs-file]
quiet

simply add this entry into /etc/lilo.conf if using lilo:
image=/boot/[your-slackware-kernel]
label=Slackware-12.2
initrd=/boot/[your-initramfs-file]
read-only


you need to update the configuration because lilo doesn't update that information automatically.
Run this command on your console:
lilo -v -v

3. Restart your pc/laptop to boot into slackware installation entry in your bootloader menu. Before you start to type "setup", make sure you already mount an iso file. If your slackware's iso image on /dev/hda2, then mount that device first before mount an iso. Assumed /dev/hda2 is a location of an iso file than mount it into a directory first. Here are a step by step:
cd /
mkdir hda2
mount /dev/hda2 /hda2
mkdir iso
mount -o loop -t iso9660 /hda2/[your-slackware-iso].iso /iso


4. now you can run setup. When prompted to select source media, choose an option to install from a pre-mounted directory. don't forget to add "slackware" directory when you insert into a pre-mounted directory column.
e.g: /iso/slackware

5. you can continue doing installation activity as usual.

There are another option for booting both kernel and initramfs file. You can use Loadlin from DOS or use Grub4Dos if you don't have any linux or bsd system before.

hope this helpful

Saturday, May 26, 2007

Repair Grub with Ubuntu LiveCD

After re-installing windows, my ubuntu partition have disappear. What I mean is a grub bootloader (which come from ubuntu) that already installed before on MBR cannot be accessed because windows re-write MBR partition with its own boot manager.

what I should do?
1. boot using ubuntu livecd (desktop version)
a. login as root
using command: sudo_root or sudo -s
b. mount your ubuntu partition
e.g: - mount point as /media/disk
mount /dev/sda1 /media/disk

2. mount your livecd /dev directory into your ubuntu mount point ( /media/disk )
e.g: mount --bind /dev /media/disk/dev

3. run this command: grub-install --root-directory=/media/disk /dev/sda

hope this helpful.

Thursday, February 15, 2007

Setup lilo into partition's superblock and load it from grub

I already have grub installed on MBR of harddisk. It's come from my ubuntu linux. Then I installing slackware and want to use slackware's lilo to load the slackware system. First, I install lilo into superblock of slackware's partition using this command:
lilo -b /dev/hda2

note:
Slackware partition is on hda2, maybe it is different with yours, depends on your system placed in harddisk (including position of disk controller and partition). In my case, I use PATA harddisk which set as primary on controller 0. And my slackware system is on second partition.

Second, edit grub's
configuration file (menu.lst). Usually in /boot/grub/menu.lst. And then add this entry:
title Slackware Lilo
root (hd0,4) #for example, if your slackware partition in /dev/hda5
chainloader +1

Now, restart the system.

hope this helpful.