# Partitioning an installed System



## rent0r (Feb 22, 2010)

Hello,

I'm relatively new to freeBSD, but that shouldn't be the problem because it's not very BSD related. I have a machine which is and won't be physically present. So there is no way to access any CD or DVD drive. There is no KVM plugged in at the moment and I can't change the boot sequence e.g. to the second hard drive.

Which way do you think of when you would like to change the partitioning of that system? Could it be possible to load a freeBSD Install CD into a ram drive and install the complete system from there again? Are there a few howto's you can think of which cover that at least partly?

I'm looking forward to a few thoughts, thank you!


----------



## SirDice (Feb 22, 2010)

rent0r said:
			
		

> So there is no way to access any CD or DVD drive. There is no KVM plugged in at the moment and I can't change the boot sequence e.g. to the second hard drive.


Then you're pretty much SOL. You really need console access. At least until you get the basic OS running.


----------



## rent0r (Feb 22, 2010)

SirDice said:
			
		

> Then you're pretty much SOL. You really need console access. At least until you get the basic OS running.



Ah sorry, I forgott to mention: the basic OS is running and I'm able to access it remotely. Shouldn't it be possible to chroot into some kind of a ramdisk and install a fresh system from there?


----------



## SirDice (Feb 22, 2010)

Ah.. If you already have a working system then you could just partition a different part of the disk and install in there. You will need to do a custom install though. Everything will need to be done 'by hand'.


----------



## rent0r (Feb 22, 2010)

Okay, is seems as it's a standard install and 100% of the drive is partitioned. Is it possible to resize /usr with on board tools without harming the system?

And another short question: When fdisk says:


```
The data for partition 2 is:
<UNUSED>
The data for partition 3 is:
<UNUSED>
The data for partition 4 is:
<UNUSED>
```

That means that the existing partitions are all (in BSD terms) allocated inside the first slice, right?


----------



## Beastie (Feb 22, 2010)

It only means the first BIOS partition/FreeBSD slice is used.

It says nothing about the use of that first slice. It may have the minimum number of (FreeBSD) partitions OR the maximum. It may be, say, 1GB big OR it may cover the entire disk, leaving 0 byte for partition 2, 3 and 4.

Tell us how big the disk is and post the entire output of fdisk, and we'll tell you more. `% df -h` may be interesting too.


----------



## rent0r (Feb 22, 2010)

I found a few things with regard to resizing. Anyway, the best option for me would be a fresh install from scratch out of the running system. I'll try to figure that out, but hints in this direction are much appreciated.

Thank you!


----------



## rent0r (Feb 22, 2010)

Beastie said:
			
		

> It only means the first BIOS partition/FreeBSD slice is used.
> 
> It says nothing about the use of that first slice. It may have the minimum number of (FreeBSD) partitions or the maximum. It may be, say, 1GB big or it may cover the entire disk.



The first slice covers the entire disk. Slice one contains four partitions mounted at /, /tmp, /usr and /var. So I assume thats it was automatically created by the installer.


----------



## J65nko (Feb 22, 2010)

I have written down a plan for dealing with such situations but it requires some free disk space.See A plan for a remote install and reinstall of FreeBSD.

I wonder whether it is possible to re-label the swap space and install a minimal FreeBSD in it. If somehow you can manage to boot into this minimal system, you would have a base to do manual sysinstall-less install. It could take a few iterations to get it right though


----------



## Ruler2112 (Feb 22, 2010)

You mentioned changing the boot device to the second hard drive - is there free space on there that you can use for the custom install?


----------



## J65nko (Feb 23, 2010)

He mentioned this 





> I can't change the boot sequence e.g. to the second hard drive.


----------



## rent0r (Feb 23, 2010)

Hm, I'll try a fresh install from a freeBSD live CD (as I've read there's a so called FIXIT console). If that doesn't work out, I've found the mfsBSD howto which pretty much seems to cover it.


----------



## Ruler2112 (Feb 23, 2010)

J65nko said:
			
		

> He mentioned this
> Quote: I can't change the boot sequence e.g. to the second hard drive.



Yes, but that doesn't mean that there isn't space available to create a partition on the drive, do a bit-wise copy from one of his non-boot partitions on his primary drive to that one, change fstab to reflect the mount point going to the new partition on the second drive, and wiping the now un-needed partition on the first drive to reclaim some space he could then use for a new install.   (Wow - talk about a run-on sentence!  :e )


----------

