|
OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below. |
|
Thread Tools | Display Modes |
|
|||
more than four primary partitions?
Hello,
Maybe this is a general question not related only to OpenBSD (4.5 release), but since I'm running OpenBSD I'll still post here. I finally made up a reasonable set up in my new Tinkpad, keeping Vista (sometimes you can't really do without Windows, especially when some friends cannot understand why a computer should run a different OS...), shrinking it with gparted and installing OpenBSD. The problem: Now I have four primary partitions in mbr, three of them are taken by Vista and Lenovo stuff, one is for OpenBSD. I left quite a lot of space free, thinking of making an ext2 partitions to share files between Vista and OpenBSD. But I see that fdisk only has four slots. In Vista, the free space is recognized, and maybe I could format it to ext2, but then will OpenBSD see it? At the beginning, I also wanted to install Opensuse, which I tried in qemu, and quite like it, so just to give a try to linux. But I see that linux makes even more partitions inside mbr, so that then OpenBSD's fdisk does not see all the partitions. Although I've read some wikis and tutorials on the web, I think I still miss some basics. Will something like gag solve this kind of problem? (I presently use Vistas boot manager). But again, will OpenBSD see a partition that exceeds the fdisk's four slots? |
|
|||
With MBR partitioning, you can have 3 "primary" partitions and 1 "extended" partition.. an extended partition is essentially a link to an additional partition table that again can have an additional 3 primary, 1 extended partition. (..this can keep going for quite a bit unfortunately.).
You already have 4 primary partitions, another variation.. thus you cannot create any extended partitions.. This can be quite confusing, and perhaps a GUI partitioning tool might be able to simplify it.. but the gist of what I'm telling you is that you'll need to repartition your disk, having 3 MBR partitions for Vista and for your laptops utility partition.. and the last partition being extended, afterword you can add a partition for OpenBSD and one for the EXT2/Linux stuff. OpenBSD 4.5 supports being installed on extended partitions now, and fdisk(8) has supported manipulation of such tables for some time as well. Please search for the "COMMAND MODE" section in that man page for more information about switching between extended table views. OpenBSD creates "fictitious" disklabel entries for foreign partitions it finds.. but I have not confirmed that it recurses through extended partition tables. Can anyone comment on this? I never install more then one operating system on my computer. |
|
|||
Thank you for your answers:
Quote:
Quote:
So, from what you are telling me, I should be able to dump OpenBSD somewhere, and then cancel its partition and turn it into an extended partition which I could split again into a partition for OpenBSD and one for my ext2 partition, or even from there create another extended partition where I could install Opensuse. Did I get it right? |
|
||||
A small update: here is the disklabel for the same disk as above, but as provided by OpenBSD:
Code:
16 partitions: # size offset fstype [fsize bsize cpg] c: 80418240 0 unused i: 273042 63 ext2fs j: 10490445 273105 ext2fs k: 5542425 10763550 unknown l: 626472 16306038 ext2fs m: 6313482 16932573 ext2fs n: 5943987 23246118 ext2fs o: 10506447 29190168 ext2fs p: 20370357 39696678 ext2fs |
|
|||
I've just tried to play with fdisk on an old usb stick, and I start to understand how it works.
For the extended partition I should choose "Extended LBA" (id 0F), right? |
|
||||
Quote:
ADDED: Hmmm, it seems 0x05, 0x0F and 0x85 are all used for this. EDIT2: Thanks BSDfan666, I added the above after seeing the original version of your post. I've always gotten away with 05, but maybe there are circumstances where the other is better, so it's good to know about. Last edited by IdOp; 10th August 2009 at 02:42 PM. |
|
|||
Quote:
EDIT: @IdOp: That may be wrong, OpenBSD calls 0x05 "Extended DOS" and 0x0F "Extended LBA", considering LBA is the modern way of addressing disks.. this may be the preferred partition type marker. EDIT2: OpenBSD appears to treat both values identically, so it doesn't matter.. it always checks for DOSPTYP_EXTEND and DOSPTYP_EXTENDL which are defined as 0x05 and 0x0F in /usr/include/sys/disklabel.h. EDIT3: OpenBSD does not support an extended partition type id of 0x85, (Linux extended). Last edited by BSDfan666; 10th August 2009 at 02:44 PM. |
|
||||
I have never been able to get the bootloader to run from an extended partition, but I've only ever tested it under Qemu. I flag the extended partition, then flag the A6 partition in the extended MBR. I get:
Quote:
|
|
|||
Quote:
|
|
|||
No, you'll have to recreate the OpenBSD partition within the extended partition table.. offsets will most likely be different, so you'll need to reinstall.
|
|
|||
I managed to install OpenBSD 4.5 in QEMU on an extended partition, unfortunately as jggimi mentioned.. the bootloader is unable to boot.
This is my mistake, I do apologize.. perhaps full support is in 4.6/-CURRENT but it is clearly not available in 4.5. |
|
|||
Ok, thank you all, I'll give it a try today, maybe Vista's bootloader will work
|
|
|||
I've tried and I thought my partitions were all ok, but now there seems to be something lost. The machines says there's no valid operating system. Gparted also shows an empty hard disk, but this is fdisk run from an OpenBSD I installed on a usb stick:
Code:
# fdisk -e sd0 Enter 'help' for information fdisk: 1> p g Disk: sd0 geometry: 32301/240/63 [233 Gigabytes] Offset: 0 Signature: 0xAA55 Starting Ending LBA Info: #: id C H S - C H S [ start: size ] ------------------------------------------------------------------------------- 0: 07 0 32 33 - 203 74 26 [ 2048: 1G] HPFS/QNX/AUX 1: 07 203 74 27 - 7137 239 63 [ 3074048: 50G] HPFS/QNX/AUX 2: 07 30946 178 19 - 32301 57 41 [ 467914752: 10G] HPFS/QNX/AUX 3: 0F 7138 0 1 - 30945 239 63 [ 107926560: 172G] Extended LBA fdisk: 1> select 3 Selected extended partition 3 New MBR at offset 107926560. Enter 'help' for information fdisk: 2> p g Disk: sd0 geometry: 32301/240/63 [233 Gigabytes] Offset: 107926560 Signature: 0xAA55 Starting Ending LBA Info: #: id C H S - C H S [ start: size ] ------------------------------------------------------------------------------- 0: A6 7138 0 1 - 14073 239 63 [ 107926560: 50G] OpenBSD 1: 83 14074 0 1 - 16154 239 63 [ 212798880: 15G] Linux files* 2: 82 16155 0 1 - 16849 239 63 [ 244263600: 5G] Linux swap 3: 83 16850 0 1 - 30945 239 63 [ 254772000: 102G] Linux files* |
|
||||
I don't know what you've done. From what you've posted:
|
|
|||
Thanks jggimi,
I changed the partition starting and now it seems fine, but still cannot find OpenBSD, or, the Vista bootloader does not show the extended partition as an option. I installed EasyBCD which gives the option to install NeoGrub, which I guess should solve the problem but I can't figure out how to tell NeoGrub to find the first partition of the extended partition. All examples I've found are about primary partitions inside mbr. So do you know how the entry in the configuration should be? "hd0,X" what should the number be? |
|
|||
I've tried (hd0,5,a) but it gives error 22 saying I should use a Vista compatible fdisk to partition the hd
How do I install gag without a floppy and without a cdrom? Added: Presently partition tables look like this: Code:
Disk: sd0 geometry: 32301/240/63 [488397168 Sectors] Offset: 0 Signature: 0xAA55 Starting Ending LBA Info: #: id C H S - C H S [ start: size ] ------------------------------------------------------------------------------- *0: 07 0 32 33 - 203 74 26 [ 2048: 3072000 ] HPFS/QNX/AUX 1: 07 203 74 27 - 7137 239 63 [ 3074048: 104852512 ] HPFS/QNX/AUX 2: 07 30946 178 19 - 32301 57 41 [ 467914752: 20480000 ] HPFS/QNX/AUX 3: 0F 7138 1 63 - 30945 239 63 [ 107926685: 359976835 ] Extended LBA Offset: 107926685 Signature: 0x0 Starting Ending LBA Info: #: id C H S - C H S [ start: size ] ------------------------------------------------------------------------------- 0: A6 7138 2 1 - 14072 239 63 [ 107926686: 104857074 ] OpenBSD 1: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused 3: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused Last edited by gosha; 11th August 2009 at 11:31 AM. |
|
||||
Quote:
Unzip the archive. Open the docs/index.html file in your browser. Click on the How to install GAG link. Read and follow the DIRECT INSTALLATION section. You'll need a running Linux system. Alternatively, remove your hard drive and insert it in a system with a diskette or CD/DVD drive. Or, do the installation from a virtual machine with a virtual floppy / CD drive, and that has been given physical access to the entire hard drive. |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Operating BSD partitions through XP | SunSpyda | OpenBSD General | 10 | 16th September 2009 08:22 PM |
How to swap partitions Help | revzalot | OpenBSD Installation and Upgrading | 2 | 1st September 2009 07:44 AM |
backup fdisk partitions | gosha | OpenBSD General | 17 | 16th July 2009 03:19 AM |
Moving ZFS partitions/drives between systems | corey_james | Guides | 2 | 6th August 2008 08:36 PM |
partitions | italogf | FreeBSD Installation and Upgrading | 5 | 7th July 2008 12:14 PM |