|
NetBSD General Other questions regarding NetBSD which do not fit in any of the categories below. |
|
Thread Tools | Display Modes |
|
|||
I'm not surprised.
Quote:
Quote:
|
|
|||
And now, I'm at the following point:
I've added two ext2 partitions next to the NetBSD slice. I've adjusted the protofile, providing the output od "sfdisk -l -uS". I've booted the install CD and from the shell prompt, after having mounted the ext2 partition where the file had been saved, I've run disklabel -R wd0 [path]protofile". Everything went OK. Now I should have on my disk ... wd0h<->wd0g<->wd0i... or, in other words ...wd0c<->wd0g<->wd0i... wd0i should remain where it is. wd0g is just a placeholder for a new (ffs) wd0g that will be created after I'll have wd0c expanded towards wd0i. So, I've booted into the real NetBSD, but... I can mount neither of them: Code:
mount_ext2fs: /dev/wd0g on /mnt/tmp: incorrect super block Of course I wouldn't care if I can't mount this wd0g for itself (anyway, I want just to go to Linux, delete it and to expand the NetBSD slice into its place), but, I'm concerned, because it means there is something wrong. (And I do care about the other partition!) Might it again be some extra feature? Last edited by gillindu; 30th January 2012 at 10:33 PM. |
|
|||
Of course, this was just for test, at this point. I might have done it under NetBSD. Only the next step I'll do have to do with the InstallCD.
Last edited by gillindu; 31st January 2012 at 12:03 AM. |
|
|||
Quote:
But, fdisk... as the first thing it says that "Extended partition table is corrupt". And then... I'm still trying to understand something (it's a rather long output). The sizes seem to be as they should be, but, one of them seems to start nearly where it should (1 or 2 sectors of shift, I'm not sure), while the another one seems to be completely misplaced! And now, looking at the sfdisk output (from Linux), it seems to be... my mistake! I've copied from the wrong columns. So, now, when I try to run "disklabel -R wd0 newproto" (with the corrected values)... I'm getting again that wd0g and wd0h overlap! (Now it would be for 62 sectors and not 126 as before.) After the sfdisk output, there should be 28 sectors of free space. It seems again that the size of the NetBSD's slice (wd0c) is slightly mispresented in the partition table, so the Linux utilities get fooled (at least, that would be my understanding) (And that's why I didn't go directly to expand the slice, but, I've tried first with this "placeholder"! Better that such things happen now!) |
|
|||
Quote:
???? Could it be - that! (Although I do not understand exactly - what ) Any comment? |
|
||||
It's getting hard for me to follow this, without knowing exactly what you've done, or seen output from the commands. (Also, I never used sfdisk, plain fdisk has always worked for me.) What I can think of at the moment is, if you look through your fdisk and disklabel partitions and try to match up the ones that agree (and kind of ignore those) and then compare the ones that differ, looking for any clues as to what went wrong.
|
|
|||
I went to Linux to resize the offending partition (wd0g in NetBSD), to "cut" the first 62 sectors off. I came back under NetBSD, I've corrected the protofile (offset + 62s; size - 62s for the partiton in causa), I've run disklabel, I've mounted the partitons and - voilà, it works! For both partitions.
Now, there's only left to do "the real thing" - to delete the partition in the middle, to expand the slice and so on. But, I'll wait a bit. Maybe there could be a room for some valuable advice, or for some warning... |
|
|||
Quote:
Quote:
|
|
|||
And this is how my disklabel table looks now:
Code:
# size offset fstype [fsize bsize cpg/sgs] a: 8721216 180458208 4.2BSD 2048 16384 0 # (Cyl. 179026 - 187677) b: 263088 189179424 swap # (Cyl. 187678 - 187938) c: 20498877 180458208 unused 0 0 # (Cyl. 179026 - 199362*) d: 312581808 0 unused 0 0 # (Cyl. 0 - 310100) g: 12289000 200957274 Linux Ext2 0 0 # (Cyl. 102063*- 103482*) h: 11514762 189442512 4.2BSD 2048 16384 0 # (Cyl. 187939 - 199362*) i: 12289062 213246275 Linux Ext2 0 0 # (Cyl. 30520*- 54904*) |
|
||||
Quote:
|
|
|||
So, I have deleted the wd0g and now I have a simple situation - just about 6000MB of free space at the right side of the NetBSD slice.
But... in (linux) fdisk there is no an option to resize a partition!!! (Or, at least, I don't see it, neither under "x", that is, under "extra functionality, experts only".) Only to delete a partition, or to add a new one. Oh, yes, there's also an option to "create a new empty Sun disklabel", as well as to "edit BSD label". But, when I try the second one, I'm being said that "there is no *BSD partition on /dev/hda". The same when I run fdisk on that particular (NetBSD's) partition. On the other side, cfdisk does have options to resize or move partitions, but, it seems that neither of these options is available for Sun-ufs filesystem. Futhermore, there is an option to edit it (to "edit this BSD disklabel"), but, when I try it - the program crashes (bug in the program)! So, how can I increase the slice!? |
|
|||
Quote:
|
|
||||
Quote:
Quote:
Quote:
|
|
|||
Or, better to say, I don't see an overlapping among them, (offset(a)+size(a)=offset(b); offset(b)+size(b)=offset(h)... at least, that would be my understanding), but rather a piece of h goes out of c.
Last edited by gillindu; 31st January 2012 at 05:33 PM. |
|
||||
Quote:
Maybe the NetBSD stuff should be backed up and re-install? With careful consideration of the disklabel at install time? .... if I'm not missing anything and there really is overlap. |
|
||||
Quote:
Quote:
Quote:
Quote:
|
|
|||
Well, I'm still failing to see it makes 197179503... never mind. However, I think I've understood I should decrease (in the disklabel table) all their sizes (a, b and h) by 1 sector, so it should be; offset+size+1 = the next offset.
|
|
||||
My advice was a bit mixed up, but I think you can still do it with fdisk. It's trickier because we're dealing with logical partitions (which form a linked list in the extended partition), rather than primary partitions. What will happen when you delete the partition is the ones after it will be renumbered downward by 1. Then when you create the new partition to replace the one you deleted, it will be put at the end of the list. This is not good, but you can fix it by going into expert mode in fdisk. That is option x. In expert mode, use option f to fix the ordering, and option p to print the new table so you can check it. Then back to the regular menu (non-expert) with r. If you can't get it to do what you want, exit fdisk without saving changes, and try to think of another way.
Quote:
|
|
||||
Quote:
You're right Sorry, I know what happened, I was reading both of the 0 in the first number as an 8 ... my eyes suck. Quote:
offset + size = first sector of space AFTER the partition offside + size - 1 = last sector of the partition Just think of size=1 as an example in the above and it should make sense I hope. |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
NetBSD 5.1 Installation issues | acottag | NetBSD Installation and Upgrading | 8 | 14th January 2011 05:06 AM |
Resizing slices | jewsofeast | NetBSD General | 1 | 20th November 2010 11:34 AM |
Resizing /usr | jewsofeast | OpenBSD Installation and Upgrading | 11 | 19th November 2010 01:46 PM |
Resizing /usr | abdo88 | FreeBSD General | 15 | 12th July 2008 01:49 PM |
NetBSD installation problem | fgs | NetBSD Installation and Upgrading | 3 | 26th June 2008 04:01 PM |