Date: Sat, 04 Mar 2000 01:14:51 -0700 From: Warner Losh <imp@village.org> To: Doug White <dwhite@resnet.uoregon.edu> Cc: Marc Frajola <marc@enginet.com>, freebsd-hackers@FreeBSD.ORG Subject: Re: How to fdisk/disklabel whole disk for FreeBSD from command line? Message-ID: <200003040814.BAA32604@harmony.village.org> In-Reply-To: Your message of "Fri, 03 Mar 2000 23:31:01 PST." <Pine.BSF.4.21.0003032320080.10089-100000@resnet.uoregon.edu> References: <Pine.BSF.4.21.0003032320080.10089-100000@resnet.uoregon.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
In message <Pine.BSF.4.21.0003032320080.10089-100000@resnet.uoregon.edu> Doug White writes: : > fdisk -e /dev/rda1 : > disklabel -r -w da1 auto : : Yeah, this is wrong. You need to specify a slice. But you can't specify a slice here. It won't work. If you give it the whole path, disklabel won't even try. If you day da1s1, it will complain that it can't fit a disklabel for the entire disk into the slice smaller than the disk with some cryptic error message or another :-). : I generally don't depend on the 'auto' magic -- it breaks for IDE : disks, and I'm not sure it works for slices either. It breaks for all disk lables that aren't the entire disk. : I'm looking at the script and notice that it doesn't select slice : 1... somehow disklabel DTRT. It works here :-) Well, you could look at my diskprep script that I just posted a reference to. http://people.freebsd.org/~imp/diskprep (also needs patches to fdisk: http://people.freebsd.org/~imp/fdisk-patch) I'd like to commit it to FreeBSD after 4.0 goes out the door. We have many partital solutions to this problem. It is time to make a simple, standard tool to do this. No, sysinstall doesn't count here because it isn't simple and cannot be driven from a script. The fla tool is limited to fla DOC2K disks. The prepdisk in picobsd has too many things hard coded and will work only for ide disks. It is designed to create a sane slice (ala fdisk -I (since -e -> -I soon)) and put a reasonable disklabel on it. By default it does only one partition, but can be configured to do more. I wrote it to deal with creating dozens of compact flash labeling when I'm given a hodge podge of CF sizes and manufactures to create images for (sometimes 48M parts are available, other times 45M parts, and each of those sizes varies +- 300 blocks between vendors). I have a microbsd-like wrapper that I put around it to actually populate the disk, but it is no where near ready for prime time. Too many local tweaks and special knowledge still in the scripts. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200003040814.BAA32604>