View Single Post
  #8   (View Single Post)  
Old 29th January 2012
IdOp's Avatar
IdOp IdOp is offline
Too dumb for a smartphone
 
Join Date: May 2008
Location: twisting on the daemon's fork(2)
Posts: 1,027
Default

Quote:
Originally Posted by gillindu View Post
So, what my proceeding should look like?
1st step: fdisk, to expand the slice? I think I've found something about somewhere in forums. Is it right? (If I should do it) can I do it from NetBSD (or, maybe, it should be done just after the boot prompt, by pressing a key and running a command?) and would it be safe for my /dev/wd0a and /dev/wd0h? (Of course, if I "expand" it the wrong way, it would be very unsafe )
WAIT No, do not proceed by using fdisk to expand the slice. Expanding of slices and partitions was outside the context of the idea I was proposing and is potentially very dangerous. (That is not to say that something along that line couldn't be done, but it is another matter entirely.)

What I was proposing was either:

a) create a new logical partition in your extended partition, at the end of it, if there is room.
This would be done with fdisk.

OR

b) take one of your existing partitions, which you are not using (if there is such) and re-purpose it (after backing up anything you want to keep from it, of course).

If either of these are possible you would have a "new" partition, which you would make an ext2 file system on (using Linux' mke2fs) with the proper options so NetBSD can use it.

Quote:
2nd step: disklabel editing
Correct. Once you have the new partition formatted as ext2, then go to NetBSD and edit the disklabel after studying the man page carefully. If unsure, ask for help before proceeding. The basic idea is to reference the new partition in the disklabel, instead of one of the other existing DOS or Linux partitions, one which you don't intend to access from NetBSD. For example, if you decided that MSDOS partition m: would never be needed from NetBSD, you could use the "m: slot" in the disklabel to refer to the new ext2 partition instead. Simply edit this line in the disklabel inserting the new size and offset (these you can get from fdisk output). And edit the fstype column from "MSDOS" to "Linux ext2". Save the disklabel and reboot if necessary.

Quote:
3th step:newfs or something, to create the new fs.
Is that proceeding correct, or maybe I should first create the fs and only then to edit disklabel?
I would do the mke2fs from Linux right after creating the new partition [case a)], or for case b) to reformat the partition you want to re-purpose after backing it up.

Step 3 would then be to mount the new partition in NetBSD:

# mount -t ext2fs -r /dev/wd0m /some/where

Again, this is my original alternate approach, nothing to do with expanding things.
Reply With Quote