Help Installing with only 1 CD

Hi I've read that it's possible to install freebsd or pcbsd from another installation of freebsd or pcbsd, but I only have linux is it possible to install it from there?

If not can anyone tell me how (without wiping my linux partition) how to install freebsd with only 1 cd or by using dd to copy a livefs (I saw that there is one in the repos but I don't know how to dd it correctly to get it to work, nor am I 100% certain that it is a live filesystem).

Any help would be appreciated.

Oh and I would like my new installation of freebsd to be able to access my /home partition of linux.
The partition that I want to install it on is a primary empty partition.

Thanks for any and all help.
 
emiliec15 said:
Hi I've read that it's possible to install freebsd or pcbsd from another installation of freebsd or pcbsd, but I only have linux is it possible to install it from there?

If not can anyone tell me how (without wiping my linux partition) how to install freebsd with only 1 cd or by using dd to copy a livefs (I saw that there is one in the repos but I don't know how to dd it correctly to get it to work, nor am I 100% certain that it is a live filesystem).

The livefs probably won't boot if you just dd(1) it to a primary slice.

You might be able to install to a virtual hard drive in an emulator and then dd the resulting slice to your hdd (but if you make a mistake you could do quite a lot of devastation in a few seconds). You would need to make perfectly sure that the [red]if=[/red] bit is definitely not even one byte larger than the [red]of=[/red] slice (smaller will just waste a bit of space).

If there was some way of manipulating and mounting (rw) FreeBSD partitions in linux (I can't find any with an off-hand search, but anyone is free to correct me here, please), you could potentially use dump(8)/restore(8). You just might be able to do this in a virtual machine, if you go about it cleverly enough.

Otherwise, you'll have to boot from CD/USB.

Accessing your ext2/3 linux partitions from FreeBSD is simple enough, though I don't really keep up on how good rw support is. ro works fine for me.
 
Having 2 operating systems on same hard drive is explained in the Freebsd handbook. You can use your linux system to download the Freebsd disc1.iso and them burn it to CD. Boot that CD, at the sysinstall main menu select standard install option. When fdisk comes up it will show you the linux and the other unused partition you want to put Freebsd in. You will have to delete that unused partition to release it’s space and then select option to create slice. This option will allocate all the remaining free space on the hard drive for the Freebsd slice. If that is not what you want then select the amount of free space you want to give the slice. 4GB is a good size. In disklabel select auto-create for file system allocations. Now here is the important part. You will be given opportunity to select the boot manager, Select option to install the boot manager. The boot manger will give you chance to select which operating to boot from after powering on your PC.

Accessing your linux /home partition can be done I think, but I don’t use linux so have no need to learn how. Ask this as a separate question in a new thread.
 
Sorry that it's been awhile... I've downloaded the dvd and tried to install (verified the md5 and that it burnt right) and it gets to the section where it should write to the harddrive but keeps giving me a message that boils down to it not being able to write to the harddrive. Any pointers?
 
I could if I'd written it down but I didn't and I really don't like the idea of running it again just to write down the message but I will if I have to. I don't want to risk it trying to write to the hard drive ads0 (I believe) so many times that the hard drive is useless to me.

If it helps any: I get through the section of sysinstall where it asks me what distribution I want to install. I didn't have the bootloader selected to be installed. After this it tries to write the installation to the hard drive and within a couple seconds (not immediately) it responds with a message stating that it can't write to adso (I believe that's what it called the harddrive.) the hard drive has been reformatted, repartitioned, anything that I could think of to do to fix the problem was done.

I am considering trying to fumble my way through an installation utilizing a livecd of freebsd (the freebsd livecd project on sourceforge) but I am not sure on all of the steps that it would take to make such an installation functional. I have done similar installs of linux with a livecd environment but as everyone knows freebsd IS NOT linux.
 
Oh I have decided that it is irrelevant if I have access to my linux /home or not.... I can always find a way to do that after its installed.
 
Just curious does anyone know if the directions http://www.daemonforums.org/showthread.php?t=1538 work? I really want freeBSD installed.

Oh and the error says that it fails to write to ad1. and the message after that says that it encountered errors writing the filesystem to disk... Sorry didn't have anything to write the messages down on. So I did my best to remember the 2 windows. Sorry.

Still looking forward to running FreeBSD!
 
So correct me if I'm wrong but what I would do for an installation like that would be:

1. Acquire a livecd of some BSD (I'm thinking the livecd freebsd project from sourceforge [only one I know of that's still got the livecd up])
2. Insert livecd.
3. acquire access to the iso from livecd and follow the steps below:
# mkdir /mnt/iso
# mdconfig -a -t vnode -f /path/to/iso -u 0
# mount -r /dev/md0 /mnt/iso

4. Create a slice like: (replacing da0 with whatever it is calling my harddrive)
# sudo fdisk -i /dev/da0
5. Create the partitions for BSD like: (help in knowing how to do this would be helpful)
Code:
# size offset fstype [fsize bsize bps/cpg]
# / - offset of the root partition MUST be zero else the system wont boot
a: 1g 0 4.2BSD
# swap
b: 1g * swap
c: * * unused
#/usr
d: 20g * 4.2BSD
# /tmp
e: 2g * 4.2BSD
# /var
f: 2g * 4.2BSD
# ZFS /home ( does not need a partition type but make it anyway )
g: * * 4.2BSD



then I'd put this code in the terminal:
newfs /dev/da0s1a (replaceing da0s1a with my partition and slice)


After that mount the drives:

# mkdir /mnt/install
# mount /dev/da0s1a /mnt/install
# cd /mnt/install
# mkdir usr var tmp
# mount /dev/da0s1d /usr
# mount /dev/da0s1e /tmp
# mount /dev/da0s1f /var


Then untar all the files from the iso:

# cd /mnt/iso
# ls

Code:
7.0-RELEASE     HARDWARE.HTM    README.TXT      boot            docbook.css
ERRATA.HTM      HARDWARE.TXT    RELNOTES.HTM    boot.catalog    floppies
ERRATA.TXT      README.HTM      RELNOTES.TXT    cdrom.inf       packages
# cd 7.0-RELEASE
# ls

Code:
base            doc             kernels         ports
catpages        games           lib32           proflibs
dict            info            manpages        src

then:

# export DESTDIR=/mnt/install

then:

# for i in `ls | grep -v kernel | grep -v src`; do cd $i; ./install.sh; cd ..; done


THEN:

mv /mnt/install/boot/GENERIC/* /mnt/install/boot/kernel/
rm -r /mnt/install/boot/GENERIC

Then I'd run kernels/install.sh and src/install.sh with the app. arguments (any idea here??)

Of course I'd need to set up a correct /etc/fstab too (that's the same as linux correct?)

After all of this I will eventually need to set up my cd drives and stuff, but I'd have a functional and running FreeBSD to do it from.
 
why don't you do the easy way with grub? I know this is a freebsd forum and people don't like grub but you already have linux on your hard drive!

What I have on the same hard drive now is : Linux, Win, FreeBSD. I am using BSD at the moment.
I had Win installed first from DELL on my D420.
Used Linux to shrink it -> Installed Linux/Grub : dual boot.
Then I tried BSD -> Used Gparted to get some space for BSD -> Installed BSD (boot from CD)
then run grub again on Linux to have triple boot.
 
To nhanguy: See the problem is I can't get FreeBSD to install. I am perfectly knoledgeable on how to set up grub to boot FreeBSD and Windows(if I want to install it) and Linux. That is not what my problem is its getting FreeBSD installed.
 
I apologize now to nhanguy if that seemed crude. I'm just wanting to get FreeBSD installed for the bootloader I can use grub or ntlboot (if I install Windows) or the FreeBSD bootloader.
 
I thought you have a CD drive. Couldn't you boot from it and install from it (if you still have some space on your hard drive) ?
 
I do have a cd drive the problem is I can't seem to get the FreeBSD install to write to my harddrive. That was why I started this post. I want to get FreeBSD installed but so far I haven't managed to do so.
 
FreeBSD already has its own livefs disc. It's available from the FTP.
If you use it, you don't need to execute commands using sudo (it has no sudo anyway).

The install scripts' options are generic for the kernel and all (if you want everything) for the source.
And don't run that "for ..." line if you want to extract these manually.

/etc/fstab should be something similar to this:
Code:
/dev/da0s1b none swap sw 0 0
/dev/da0s1a / ufs rw 1 1
/dev/da0s1d /usr ufs rw 2 2
/dev/da0s1e /tmp ufs rw 2 2
/dev/da0s1f /var ufs rw 2 2
[...]
 
Ok thanks again for clarifying some. So I think I get it.
Please correct me if I'm wrong...
So if I was to try to do this from the livefs cd I would
Insert the livefs cd (of course after I get a cd and burn it)

Then:
Code:
fdisk -i /dev/da0


        bsdlabel -e -r da0s1


This will bring up an edit session (vi)
Then edit it to something like what follows.
Code:
    # /dev/da0s1:
    8 partitions:
    # size offset fstype [fsize bsize bps/cpg]
    a: 1024000 0 4.2BSD 0 0 0
    b: 2097152 * swap
    c: * 0 unused 0 0 # "raw" part, don't edit
    d: 2097152 * 4.2BSD 0 0 0
    e: * * 4.2BSD 0 0 0


THEN:
Code:
newfs /dev/da0s1a
mkdir /mnt/install
mount /dev/da0s1a /mnt/install
cd /mnt/install
mkdir usr var tmp
mount /dev/da0s1d /usr
mount /dev/da0s1e /tmp
mount /dev/da0s1f /var
cd /mnt/iso
ls 
cd 8.0-RELEASE
ls 
export DESTDIR=/mnt/install

Not sure how to extract it manually instead of running the "for..." line

Code:
mv /mnt/install/boot/GENERIC/* /mnt/install/boot/kernel/
rm -r /mnt/install/boot/GENERIC

then:
kernels/install.sh (using the argument GENERIC)
src/install.sh (using the argument ALL)


Then I'd set up /etc/fstab like something BEASTIE posted.

then find some bootloader probably GRUB, since I know how to use it, and install it.

IF THIS IS CORRECT AND IT WORKS I WILL BE ECSTATIC ON HAVING A WORKING FreeBSD Install.
Of course, I will probably be posting a new thread but lets worry about that after its installed!
 
I apologize to any moderators for not formatting the last post (and all of the previous ones) correctly. I am trying to format them correctly. Just not always good at it. Too many forums have different rules and I use a few forums infrequently so rules get jumbled in my head. Again I apologize.
 
This should work. But I don't know where you're getting the -r bsdlabel(8) option from.
And you should newfs(8) all these partitions (not only root) too before installing. You won't be able to mount them anyway if you don't.

install.sh are just scripts, so for instance in the source directory, you execute it like that: # ./install.sh all.
 
Sorry to be such a worry sport but I got the cd to run.... last night I found a random suggestion to try running the cd but exiting to the command prompt after it loads and entering a command and then having it boot.

That command was:

Code:
set hw.ata.ata_dma=0 
boot

I need to know if this is safe and if there is someway to automate putting that in for every boot so I don't have to?

And I need to get a desktop...however I'd like to know if that is safe first.
 
This disables DMA for your disks. If by safe you mean "will it erase all my precious files" or "will it fry my motherboard", then yes it's safe. Disabling DMA might prevent the disk from booting if it supports no other mode. But next time you reboot the machine it should be gone, so don't worry too much.

If it solves your problems, you can add it to /boot/loader.conf as:
Code:
hw.ata.ata_dma=0
 
Ok thanks... so now I have a functioning FreeBSD installation! Hoorah!

Knowing this is there anything anyone knows that can make my disk boot without haaving to insert that command?
 
Back
Top