≡ Menu

hard disk

If you are using hot swappable hard disk and created new partition using fdisk then you need to reboot Linux based system to get partition recognized. Without reboot you will NOT able to create filesystem on your newly created or modified partitions with the mke2fs command.

However with partprobe command you should able to create a new file system without rebooting the box. It is a program that informs the operating system kernel of partition table changes, by requesting that the operating system re-read the partition table.
[click to continue…]

Configure Ubuntu Linux GRUB to load FreeBSD

Recently my friend emailed me an interesting scenario. He installed FreeBSD 6.0 / 7.0 in the first primary partition (10G). One day he installed Ubuntu Linux. He can boot into Linux but not able to boot into FreeBSD. Now, my friend wanted to boot both FreeBSD and Ubuntu Linux via Grub boot loader.

It is not that hard to configure grub to boot FreeBSD. You just need to add following three lines to grub configuration file (/boot/grub/menu.lst). Boot into Ubuntu Linux and use text editor to edit the file /boot/grub/menu.lst ( Red hat and friends [ Fedora / CentOS ] try /etc/grub.conf file) :
$ gksudo gedit /boot/grub/menu.lst
OR
$ gksudo vi /boot/grub/menu.lst
Append FreeBSD boot Configuration:

title  FreeBSD 7.0
root   (hd0,a)
kernel /boot/loader

Save and close the file. To see changes or to boot into FreeBSD reboot Ubuntu Linux box.
Where,

  • title FreeBSD 7.0 : Start a new boot entry. User always sees this title and hit enter key to boot os.
  • root (hd0,a) : Actual part is to select the correct root partition. The root option set the current root device to the device, then attempt to mount it to get the partition size. In above example - hd0 is your first hard disk i.e. hda in Linux. In grub hda is hd0. Likewise your first, second partition on the first hard disk – hda1, hda2, becomes hd0,0 hd0,1 in Grub. In short, you are asking to use first hard first partition (remember FreeBSD use a,b,c names to represent partition names). If you have installed FreeBSD on third partition then you need to use following root statement:
    root (hd0,2,a)
  • kernel /boot/loader : Use to load the primary boot image. FreeBSD use /boot/loader to load rest of kernel and os.