|
OpenBSD Installation and Upgrading Installing and upgrading OpenBSD. |
|
Thread Tools | Display Modes |
|
|
|||
Create a partition for OpenBSD in a multi-boot OS environment
Guys,
Before you’re going to advise me against doing it, I did read the advisory in 4.9 of “Multibooting OpenBSD (amd64, i386)” of http://www.openbsd.org/faq/faq4.html#Multibooting I just want to learn and I hope you will indulge me First, I have only one SSD of about 240 GB. Second, I have Ubuntu OS installed on /dev/sda1 (I don’t know what it will be named on OpenBSD). sda1 contains all the /root, /home, /var/, /temp, /usr that Ubuntu will use. I didn’t create a swap partition as I’m using an SSD. Grub2 has been installed on the MBR. Third, I wish to install OpenBSD (amd64, US keyboard) on /dev/sda2. Again sda2 will contain all the /root, /home, /var, /temp, /usr that OpenBSD needs. I don’t want to create a swap partition for OpenBSD OS. The reason is I’m using an SSD. I met an obstacle during installation and I hope that you will help me out: Code:
Use (W)hole disk or (E)dit the MBR? [whole] e You will now create a single MBR partition to contain your OpenBSD data. This partition must have an id of ‘A6’; must *NOT* overlap other partitions; and must be marked as the only active partition. Inside the fdisk command, the ‘manual’ command describes all the fdisk commands in detail. Disk: sd0 geometry: 29185/255/63 [468862128 sectors) Offset: 0 Signature: 0xAA55 Starting Ending LBA Info: #: id C H S - C H S [start : size] *0: 83 0 32 33 - 3647 67 4 [2048 : 58591232] Linux files* 1: 83 3647 67 5 - 9118 40 10 [58593280 : 87889920] Linux files* 2: 00 0 0 0 - 0 0 0 [0 : 0 ] unused 3: 00 0 0 0 - 0 0 0 [0 : 0 ] unused Enter ‘help’ for information fdisk: 1> I did consult the FAQs, ‘man’ pages and even typed in ‘help’ at the fdisk: 1> prompt before I posted this request for help. I couldn’t make sense of all the parameters and options available with fdisk. All I wish to do is create a 45 GB partition on /dev/sda2 of my SSD for OpenBSD (all the system files, /home, /temp, /user). Thanks in advance for your help in this. Last edited by cravuhaw2C; 13th July 2014 at 09:21 AM. |
|
||||
|
|
||||
Quote:
Let's look at sd0 a little more closely You will find 32 devices in /dev for sd0: Code:
$ ls /dev/*sd0* /dev/rsd0a /dev/rsd0f /dev/rsd0k /dev/rsd0p /dev/sd0e /dev/sd0j /dev/sd0o /dev/rsd0b /dev/rsd0g /dev/rsd0l /dev/sd0a /dev/sd0f /dev/sd0k /dev/sd0p /dev/rsd0c /dev/rsd0h /dev/rsd0m /dev/sd0b /dev/sd0g /dev/sd0l /dev/rsd0d /dev/rsd0i /dev/rsd0n /dev/sd0c /dev/sd0h /dev/sd0m /dev/rsd0e /dev/rsd0j /dev/rsd0o /dev/sd0d /dev/sd0i /dev/sd0n $ The "c" partition is special, and reserved. It is always "the entire physical disk" and used with commands where you want to address the entire drive, such as fdisk(8). Those commands will take the short form of the device and convert it to the proper device node, internally. So you can type # fdisk -e sd0 to edit an MBR partition table and the fdisk(8) program will use the /dev/rsd0c device node for you, as if you had typed # fdisk -e /dev/rsd0c . Some commands that address individual OpenBSD partitions, such as newfs(8), will allow similar short forms: # newfs sd3f will be interpreted as if # newfs /dev/rsd3f was used.The internal partitions, a-p, are often called disklabel partitions, as their configuration is stored in an area of the drive used by OpenBSD called a disklabel, and managed by the disklabel(8) program. Quote:
When using fdisk(8), you can address by C/H/S or by LBA, but not both at the same time. With C/H/S, you see starting and ending numbers, based on the geography reported above the table. With LBA, you see starting sector number and size in sectors. To add the OpenBSD MBR partition, you can edit (e) either partition 2 or 3, and assign either by CHS starting and ending or by LHS and size. Then, you must flag (f) the partition as active, so that the partition will be booted by your BIOS, and then you can either write (w) the MBR or quit (q) and be prompted whether to write your changes or not. Back up your system, first. But you knew that, right? Last edited by jggimi; 13th July 2014 at 04:43 PM. Reason: typo, of course. always. |
|
|||
Quote:
MBR = master boot record There can be only one unique MBR on a single HDD or SSD with single or multiple installed OSes. Secondly, what are those 5 architectures that use MBRs? I know Microsoft Windows, Linux and BSD. What are the remaining 2 architectures? Quote:
Quote:
I would appreciate your help in this very much and you can even make it into an FAQ on the official OpenBSD website. Thanks for your advice. The SSD I'm using is a spare one, used primarily for testing out Linux distros. I'm using it to learn about OpenBSD for now. |
|
||||
I should add that, when using LBA mode, for size you can add "g" for gigabytes or "m" for megabytes. You don't need to hand calculate 512-byte sector counts. You can also use "*" instead of a number to mean "to the end of the drive".
|
|
|||
Quote:
It would be good if you could write a short wiki on how to install OpenBSD in a multi-boot environment with the following parameters:
|
|
|||||||
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Herewith, your flying lesson. It starts with a preflight check at step 1.
Last edited by jggimi; 13th July 2014 at 07:23 PM. Reason: typo. again. this time just a misplaced comma and a misspelling of ubuntu. |
|
|||
Quote:
Quote:
Using OpenBSD's terminology, partition 0 would correspond to /dev/sda1 and partition 1 to /dev/sda2. Based on this assumption, how did partition 0 end up with only 27.94 GB (28,609 MB divided by 1024 MB = 27.94 GB) ? and partition 1 yields 41.91 GB (42,915 MB divided by 1024 MB = 41.91 MB) ? Why is there such a great difference in calculating partition sizes using Ubuntu and OpenBSD? Either the calculation method used by Ubuntu or OpenBSD is correct, but not both. I don't understand how you arrived at 512-byte sectors. You see: 58,591,232 divided by 28,609 gives 2048-byte sectors, no? Quote:
Am I right to assume you were referring to partition 2 that corresponds to id #2? If yes, shouldn't I start on Cylinder 9118 and not 9119? Using C/H/S method, shouldn't the starting values be 9118 /40 /11? If using LBA method, how did you arrive at sector 146496735? Special note: I appreciate all that you have done for me thus far and also for writing lengthy explanations for the questions that I asked. If anyone is to be the face of OpenBSD, I would nominate you for you have shown that you are able to interface with the public and help guide novice users. Your job title at OpenBSD should be "official ambassador". |
|
||||||
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
|
Tags |
create, fdisk, multiboot, partition |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
FreeBSD won't boot after mounting root partition on OpenBSD | Jtf | FreeBSD Installation and Upgrading | 12 | 19th March 2014 04:43 AM |
Altq on multi wan and multi zone environment | apsaras | OpenBSD Security | 0 | 26th May 2012 11:19 PM |
g4u -> create just one boot floppy | ccc | NetBSD General | 4 | 19th June 2011 04:46 PM |
create a FAT32 partition and format it. | wesley | OpenBSD General | 2 | 6th November 2010 08:31 AM |
Tried to create new partition using sysinstall but change is not permanent | disappearedng | FreeBSD General | 7 | 6th July 2008 10:00 PM |