Hitchhiker's Guide to Openbsd
- The partitions are not in my disklabel! What should I do?
Download 1.27 Mb. Pdf ko'rish
|
obsd-faq49
14.16.1 - The partitions are not in my disklabel! What should I do?
If you install foreign filesystems on your system (often the result of adding a new operating system) after you have already installed OpenBSD, a disklabel will already be present, and it will not be updated automatically to contain the new foreign filesystem partitions. If you wish to use them, you need to add or modify these partitions manually using disklabel(8) . As an example, I have modified one of my existing ext2 partitions: using Linux's fdisk program, I've reduced the size of the 'o' partition (see disklabel output above) to 1G. We will be able to recognize it easily by its starting position (offset: 64372518) and size (13783707). Note that these values are sector numbers, and that using sector numbers (not megabytes or any other measure) is the most exact and safest way of reading this information. Before the change, the partition looked like this using OpenBSD's fdisk(8) utility (leaving only relevant output): # fdisk wd0 . . . Offset: 64372455 Signature: 0xAA55 Starting Ending LBA Info: #: id C H S - C H S [ start: size ] ------------------------------------------------------------------------ 0: 83 4007 1 1 - 4864 254 63 [ 64372518: 13783707 ] Linux files* . . . As you can see, the starting position and size are exactly those reported by disklabel(8) earlier. (Dont' be confused by the value indicated by "Offset": it is referring to the starting position of the extended partition in which the ext2 partition is contained.) After changing the partition's size from Linux, it looks like this: # fdisk wd0 . . . Offset: 64372455 Signature: 0xAA55 Starting Ending LBA Info: #: id C H S - C H S [ start: size ] ------------------------------------------------------------------------ 0: 83 4007 1 1 - 4137 254 63 [ 64372518: 2104452 ] http://www.openbsd.org/faq/faq14.html (27 of 34)9/4/2011 10:02:25 AM 14 - Disk Setup Linux files* . . . Now this needs to be changed using disklabel(8). For instance, you can issue disklabel -e wd0 , which will invoke an editor specified by the EDITOR environment variable (default is vi). Within the editor, change the last line of the disklabel to match the new size: o: 2104452 64372518 ext2fs Save the disklabel to disk when finished. Now that the disklabel is up to date again, you should be able to mount your partitions as described above. You can follow a very similar procedure to add new partitions. Download 1.27 Mb. Do'stlaringiz bilan baham: |
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2025
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling