Showing posts with label howto. Show all posts
Showing posts with label howto. Show all posts

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.

Monday, December 4, 2006

Mounting iso image file under freeBSD

Not like linux mount tool, in freebsd, this tool doesn't support option for mount via a loop device (or whatever it says in freeBSD). This is what I always did if I want to mount an iso image file under linux. And then what should I do to mount an iso image filesystem under freeBSD?
Based on FreeBSD's manual page, there is one more step to make it possible before I mount an iso image file. I should build an iso image as a virtual disk first, using mdconfig (because I use version 6.1 RELEASE).
here are the command:
mdconfig -a -t vnode -f imagefile -u 0
mount /dev/md0 /mnt


to remove it, simply type this command in console:
umount /mnt
mdconfig -d u 0

hope this helpful.

Saturday, November 18, 2006

How to open slackware's initramfs image file

Here are a step by step what I've done when try to open an initramfs file which come with slackware installation stuff (either using CD/DVD installation or an iso image). I just want to know what are on an initrd.img file (an initramfs itself) which located in directory isolinux.
Before I give the command, I would like to explain you how an initramfs image created with slackware. There is a tool to do this, mkinitrd, and it's only a bash script file. A part of source which exactly generate an initramfs image is on a build_initrd_image() procedure. Here is the source:

# Wrap the initrd as an initramfs image and move it into place:
( cd $SOURCE_TREE
rm -f $OUTPUT_IMAGE
find . | cpio -o -H newc | gzip -9c > $OUTPUT_IMAGE
)

Now we know how an initramfs image created, and we can simply extract it with a gunzip tool first and followed with a cpio tool. a complete command is looks like this:

gunzip -c initrd.img | cpio -i -d -H newc --no-absolute-filenames

I prefer if you doing all of this activity in new directory. first, copy an initrd.img's file into your new directory
and make sure you have write access on that directory. And now, you can run that command inside that directory.
If there is an error message like this : "cpio: Operation not permitted", you can try to run the command with user root.


hope this helpful.