LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   *BSD (https://www.linuxquestions.org/questions/%2Absd-17/)
-   -   Dual boot with Slackware and FreeBSD (https://www.linuxquestions.org/questions/%2Absd-17/dual-boot-with-slackware-and-freebsd-408383/)

hosler 01-26-2006 06:30 PM

Dual boot with Slackware and FreeBSD
 
I have slackware 10.2 running on my laptop right now. I would like to install FreeBSD 6.0 on it too with a dual boot. I want these two operating systems to share the same /home partition. Is that possible? Right now my /home partition takes up the majority of my disk, and I would like to slice off a bit of it for the FreeBSD OS. How can I do this?

Dan Angelescu 01-27-2006 05:49 AM

Dual boot
 
Hi !

As I know you can do this using a bootmanager to boot and putting your-s home partition in freebsd's fstab.
I recomend you to not do so because the partition will be mounted at startup and not unmounted at shutdown because it isn't a ufs partition.

I recommend you to make an script which will be placed in /usr/local/etc/rc.d to do what you need.
The script must have sh extension and must be executable.
It must also accept parameters as start and stop.
At start /home partiton will be mounted and at stop it will be umounted.

All the best !

reddazz 01-27-2006 08:39 AM

If your /home is not ext2 then I am positive that FreeBSD will not be abe to mount it.

Dan Angelescu 01-27-2006 01:32 PM

Dual boot..........
 
Corect !
FreeBSD can read write only ext2 or ext3 linux partitions.
It can read reiserfs but no write the same with ntfs.
I hope that home partition is ext2 or ext3.

hosler 01-27-2006 09:59 PM

yeah its ext2. How should I partition up my HD? Should I use fdisk, or the partition program that comes on the freebsd boot disc? Also, how do I partition up my /home partition without losing any data?

reddazz 01-27-2006 10:51 PM

Quote:

Originally Posted by Dan Angelescu
Corect !
FreeBSD can read write only ext2 or ext3 linux partitions.
It can read reiserfs but no write the same with ntfs.
I hope that home partition is ext2 or ext3.

Ahh, I didn't know about ext3. Thanks for the update. :)

Dan Angelescu 01-28-2006 01:36 AM

Dual boot
 
Hi !
For install FreeBSD you need a primary partition . To do this you must repatition yours drive but because you have already installed
slackware you must use an undestructive partition tool.
As I know the only tool that make this on linux is gparted a clone of partition magic.After you do that you must install FreeBSD and recompile kernel with ext2fs support.
If you don't know howto make this use my FreeBSD Live CD named RoFreeSBIE-1.1 to install.The kernel placed on CD contains ext2fs support.
RoFreeSBIE-1.1 can be installed only on a free primary partition
or on a dedicated drive.
It can be download from :
http://linux.softpedia.com/get/Syste...e-CD-9067.shtm
The only major problem is to make a primary free partition .After you do that all is easy.
All the best !

halo14 02-02-2006 01:45 PM

technically, it can only do it with ext2, since ext3 is simply ext2 with journalling, which freebsd doesn't support... thus making it an ext2 filesystem. ;)

primo 02-02-2006 07:57 PM

Post the output of "fdisk -l /dev/hda" so we can help.

You can resize your reiserfs/ext[23]/vfat/ntfs partitions *easily* and make room for FreeBSD. It can be made from a live-CD, then you set up a new size for the extended partition. I guess you have a free primary partition to use, ie: hda3 or 4.

3 GB is too little! You can easily fill your hard drive while you're compiling software with ports and if you use X. You may share the swap partition used by slackware moving it to a primary partition. All of this can be done in a safe way with attention. Write to paper the C/H/S of the new partition table so you may feed it to the installation of FreeBSD to make both OS'es agree on the geometry. Save the MBR before installing and backup your important stuff just in case.

Code:

dd if=/dev/hda of=/mnt/floppy/mbr bs=512 count=1
md5sum /mnt/floppy/mbr > /mnt/floppy/mbr.md5
md5sum -c /mnt/floppy/mbr.md5

If for some reason you mess the partition table (stored in the MBR) at FreeBSD, then it's easy to restore it:
Code:

md5sum -c /mnt/floppy/mbr.md5
dd if=/mnt/floppy/mbr of=/dev/hda bs=512 count=1


hosler 02-03-2006 10:26 AM

Code:

  Device Boot      Start        End      Blocks  Id  System
/dev/hda1              1          4      32098+  83  Linux
/dev/hda2              5        129    1004062+  82  Linux swap
/dev/hda3            130        628    4008217+  83  Linux
/dev/hda4            629        4864    34025670  83  Linux

hda1 is my /boot partition, hda2 is my swap, hda3 is my / partition for linux, and hda4 is my /home partition. I think I can only have 4 primary partitions, so what changes would you guys recomend?

primo 02-03-2006 03:40 PM

You're using all available primary partitions =/

Either you use parted or tar to backup both hda3 & hda4 to create a DOS extended partition and insert them there. An extended partition has its own partition table.


All times are GMT -5. The time now is 10:03 PM.