Re: Adding a new drive
Andrew Hesford wrote: On Fri, Apr 06, 2001 at 10:17:24AM +0200, Jon Molin wrote: The -I option gives the same output: jmo# fdisk -I ad3 *** Working on device /dev/ad3 *** fdisk: invalid fdisk partition table found jmo# disklabel -B -w -r ad3s1 auto disklabel: /dev/ad3s1: Device not configured /jon [snip] Why don't you try this: re-zero the device, just to make sure it's clean, then give fdisk another go. If it fails, re-zero it again, and try to use Windows fdisk (or even Linux) to partition the drive. If neither one succeeds, you know the disk got trashed, and your failure is most likely a coincidence. If one *does* succeed, then save the MBR, put the disk in your FreeBSD box, and edit the existing MBR with the FreeBSD fdisk. -- Andrew Hesford [EMAIL PROTECTED] When i first got the disk it was windows and i was able to mount and get the data from it. Then i used freebsd fdisk and all 'dispeared'. Then i used a slackware bootdisk to get fdisk there and was able to make it a bsd partition, but when i booted back to freebsd and tried to slice it it didn't work... And i got the devices there: # ls /dev/ad3* /dev/ad3/dev/ad3e /dev/ad3s1a /dev/ad3s1f /dev/ad3s4 /dev/ad3a /dev/ad3f /dev/ad3s1b /dev/ad3s1g /dev/ad3b /dev/ad3g /dev/ad3s1c /dev/ad3s1h /dev/ad3c /dev/ad3h /dev/ad3s1d /dev/ad3s2 /dev/ad3d /dev/ad3s1 /dev/ad3s1e /dev/ad3s3 /jon To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Adding a new drive
On 0, Jon Molin [EMAIL PROTECTED] wrote: Wrote FDISK partition information out successfully. After that i quit back to config menu, goes into label and there i just do an 'auto' to see if it works, there i get the following when i write: Unable to add /dev/ad3s1b as a swap device: Device not configured and similar errors for the rest of the partitions. Out of curiosity, and because I have this annoying itch in my brain that's telling me I ran into this problem recently: Are the entries for ad3* actually in /dev? I recall having to ./MAKEDEV them for the ad2 and ad3 disks on one of my machines that I added a drive to not more than a couple of weeks ago... Depending on how disklabel works, I could see it returning the "Device not configured" message if the /dev file isn't there... mike PGP signature
Re: Adding a new drive
In message [EMAIL PROTECTED] Andrew Hesford writes: : Hrm... I'm sorry then. I have no idea why the Handbook asks you to zero : out the device, it consumes a lot of time and really isn't necessary. I : wonder if that could be the source of your problem. The handbook should say that only the first cylendar (usually 1M) should be zeroed. Warner To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Adding a new drive
On Sat, Apr 07, 2001 at 07:26:30PM -0600, Warner Losh wrote: In message [EMAIL PROTECTED] Andrew Hesford writes: : Hrm... I'm sorry then. I have no idea why the Handbook asks you to zero : out the device, it consumes a lot of time and really isn't necessary. I : wonder if that could be the source of your problem. The handbook should say that only the first cylendar (usually 1M) should be zeroed. Why is it important to zero out the first cylinder? I can understand wiping the first sector to destroy the MBR (although I don't see why this matters, either), but what makes the first cylinder special? -- Andrew Hesford [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Adding a new drive
In message [EMAIL PROTECTED] Andrew Hesford writes: : Hrm... I'm sorry then. I have no idea why the Handbook asks you to zero : out the device, it consumes a lot of time and really isn't necessary. I : wonder if that could be the source of your problem. The handbook should say that only the first cylendar (usually 1M) should be zeroed. do you really need to zero out everything, or just the MBR, or maybe just the first block in the slice ? cheers luigi To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Adding a new drive
In message [EMAIL PROTECTED] Andrew Hesford writes: : On Sat, Apr 07, 2001 at 07:26:30PM -0600, Warner Losh wrote: : In message [EMAIL PROTECTED] Andrew Hesford writes: : : Hrm... I'm sorry then. I have no idea why the Handbook asks you to zero : : out the device, it consumes a lot of time and really isn't necessary. I : : wonder if that could be the source of your problem. : : The handbook should say that only the first cylendar (usually 1M) : should be zeroed. : : Why is it important to zero out the first cylinder? I can understand : wiping the first sector to destroy the MBR (although I don't see why : this matters, either), but what makes the first cylinder special? Because our bootblock insertion code can be stupid. There are many cases when you fdisk -I and then disklabel a disk where the MBR will be hozed (I think this is only the copy of the MBR in the boot1 image located in the second track of the disk). We have found that this second copy of the MBR, which is almost always bogus, confuses things. dd of /dev/zero for the first track or so cures this and allows us to lay down correct MBR and freebsd disk label. A cylinder might be overkill, but it is what we do on the CF that we make bootable. Warner To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Adding a new drive
In message [EMAIL PROTECTED] Luigi Rizzo writes: : In message [EMAIL PROTECTED] Andrew Hesford writes: : : Hrm... I'm sorry then. I have no idea why the Handbook asks you to zero : : out the device, it consumes a lot of time and really isn't necessary. I : : wonder if that could be the source of your problem. : : The handbook should say that only the first cylendar (usually 1M) : should be zeroed. : : do you really need to zero out everything, or just the MBR, : or maybe just the first block in the slice ? In practice, I've foudn that the MBR (sector 0) plus the first track plus the first sector that will be in the slice that fdisk creates are the critical parts. Otherwise boot1 gets confused and won't boot things. Warner To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Adding a new drive
Hi Before you just stopp reading with the thought 'duh, this question is for freebsd-newbie' please read it becouse i've asked it both at newbie and questions and haven't got any sullotion. What I'm trying to do is to simply add a new ide drive with only freebsd to get some more space and i can't do it. Fdisk doesn't seems to write the info to the drive. I've used it before so i know there's no problem with the drive itself, tried both fat32 and ext2fs and that works just fine. The kernel finds the drive: ad3: 6187MB FUJITSU MPB3064ATU [13410/15/63] at ata1-slave UDMA33 I've tried all the suggestions on http://www.freebsd.org/handbook/disks-adding.html without any result. I've attached an output from script when i try it. /jon Script started on Fri Apr 6 09:17:09 2001 You have mail. jmo# dmesg|grep ad3 ad3: 6187MB FUJITSU MPB3064ATU [13410/15/63] at ata1-slave UDMA33 jmo# fdisk ad3 *** Working on device /dev/ad3 *** parameters extracted from in-core disklabel are: cylinders=13410 heads=15 sectors/track=63 (945 blks/cyl) Figures below won't work with BIOS for partitions not in cyl 1 parameters to be used for BIOS calculations are: cylinders=13410 heads=15 sectors/track=63 (945 blks/cyl) fdisk: invalid fdisk partition table found Media sector size is 512 Warning: BIOS sector numbering starts with sector 1 Information from DOS bootblock is: The data for partition 1 is: UNUSED The data for partition 2 is: UNUSED The data for partition 3 is: UNUSED The data for partition 4 is: sysid 165,(FreeBSD/NetBSD/386BSD) start 63, size 12672387 (6187 Meg), flag 80 (active) beg: cyl 0/ sector 1/ head 1; end: cyl 97/ sector 63/ head 14 jmo# dd if=/dev/zero of=/dev/rda1 bs=1k count=1[P1[P1[P [@a [@d [@3 1+0 records in 1+0 records out 1024 bytes transferred in 0.001942 secs (527313 bytes/sec) jmo# fdisk -BI ad3 *** Working on device /dev/ad3 *** fdisk: invalid fdisk partition table found jmo# fdisk ad3 *** Working on device /dev/ad3 *** parameters extracted from in-core disklabel are: cylinders=13410 heads=15 sectors/track=63 (945 blks/cyl) Figures below won't work with BIOS for partitions not in cyl 1 parameters to be used for BIOS calculations are: cylinders=13410 heads=15 sectors/track=63 (945 blks/cyl) fdisk: invalid fdisk partition table found Media sector size is 512 Warning: BIOS sector numbering starts with sector 1 Information from DOS bootblock is: The data for partition 1 is: UNUSED The data for partition 2 is: UNUSED The data for partition 3 is: UNUSED The data for partition 4 is: sysid 165,(FreeBSD/NetBSD/386BSD) start 63, size 12672387 (6187 Meg), flag 80 (active) beg: cyl 0/ sector 1/ head 1; end: cyl 97/ sector 63/ head 14 jmo# exit exit Script done on Fri Apr 6 09:18:45 2001
Re: Adding a new drive
On 0, Jon Molin [EMAIL PROTECTED] wrote: Hi Before you just stopp reading with the thought 'duh, this question is for freebsd-newbie' please read it becouse i've asked it both at newbie and questions and haven't got any sullotion. What I'm trying to do is to simply add a new ide drive with only freebsd to get some more space and i can't do it. Fdisk doesn't seems to write the info to the drive. I've used it before so i know there's no problem with the drive itself, tried both fat32 and ext2fs and that works just fine. The kernel finds the drive: ad3: 6187MB FUJITSU MPB3064ATU [13410/15/63] at ata1-slave UDMA33 Easiest way to do this is to use /stand/sysinstall - be careful about it (think about what you're doing before you commit anything), but by using the fdisk disklabel sections of the prog, it's pretty simple to add an extra drive... It warns you that you should "only use this on a RUNNING system!" in certain places - that's normal. You're basically editing what the system uses for mount points, etc. Just don't muck around with your running drives... mike PGP signature
Re: Adding a new drive
On Fri, Apr 06, 2001 at 09:21:57AM +0200, Jon Molin wrote: jmo# fdisk -BI ad3 *** Working on device /dev/ad3 *** fdisk: invalid fdisk partition table found Obviously you didn't read the man pages. `fdisk -BI ad3` is a typo, most likely because the disklabel command uses the -Brw flag. From the man page, we see that fdisk's -B flag reinitializes boot code in sector 0 of the disk. But if there is no code to reinitialize, it exits with an error, saying you don't have a proper MBR. If you want a single slice on the disk, just do `fdisk -I ad3`. Then run disklabel like the walkthrough says. -- Andrew Hesford [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Adding a new drive
The -I option gives the same output: jmo# fdisk -I ad3 *** Working on device /dev/ad3 *** fdisk: invalid fdisk partition table found jmo# disklabel -B -w -r ad3s1 auto disklabel: /dev/ad3s1: Device not configured /jon Andrew Hesford wrote: On Fri, Apr 06, 2001 at 09:21:57AM +0200, Jon Molin wrote: jmo# fdisk -BI ad3 *** Working on device /dev/ad3 *** fdisk: invalid fdisk partition table found Obviously you didn't read the man pages. `fdisk -BI ad3` is a typo, most likely because the disklabel command uses the -Brw flag. From the man page, we see that fdisk's -B flag reinitializes boot code in sector 0 of the disk. But if there is no code to reinitialize, it exits with an error, saying you don't have a proper MBR. If you want a single slice on the disk, just do `fdisk -I ad3`. Then run disklabel like the walkthrough says. -- Andrew Hesford [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Adding a new drive
Mike Nowlin wrote: On 0, Jon Molin [EMAIL PROTECTED] wrote: Hi Before you just stopp reading with the thought 'duh, this question is for freebsd-newbie' please read it becouse i've asked it both at newbie and questions and haven't got any sullotion. What I'm trying to do is to simply add a new ide drive with only freebsd to get some more space and i can't do it. Fdisk doesn't seems to write the info to the drive. I've used it before so i know there's no problem with the drive itself, tried both fat32 and ext2fs and that works just fine. The kernel finds the drive: ad3: 6187MB FUJITSU MPB3064ATU [13410/15/63] at ata1-slave UDMA33 Easiest way to do this is to use /stand/sysinstall - be careful about it (think about what you're doing before you commit anything), but by using the fdisk disklabel sections of the prog, it's pretty simple to add an extra drive... It warns you that you should "only use this on a RUNNING system!" in certain places - that's normal. You're basically editing what the system uses for mount points, etc. Just don't muck around with your running drives... mike Thanks for the quick reply Mike but i've tried that and it the same result there, it doesn't save. Here's what i do: Configure-Fdisk-ad3 In there i choose 'A' and i reply yes to if i want it to 'remain cooperative', then i type 'w' to write and i choose 'none' boot mngr. And fdisk says happily: Wrote FDISK partition information out successfully. After that i quit back to config menu, goes into label and there i just do an 'auto' to see if it works, there i get the following when i write: Unable to add /dev/ad3s1b as a swap device: Device not configured and similar errors for the rest of the partitions. And then i exit out to the prompt and do 'fdisk ad3' with the same result as before. I've alos tried rebooting after fdisk before labeling (a guy told me to try that) but that made no diff. /jon To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Adding a new drive
On Fri, Apr 06, 2001 at 10:17:24AM +0200, Jon Molin wrote: The -I option gives the same output: jmo# fdisk -I ad3 *** Working on device /dev/ad3 *** fdisk: invalid fdisk partition table found jmo# disklabel -B -w -r ad3s1 auto disklabel: /dev/ad3s1: Device not configured /jon Hrm... I'm sorry then. I have no idea why the Handbook asks you to zero out the device, it consumes a lot of time and really isn't necessary. I wonder if that could be the source of your problem. Why don't you try this: re-zero the device, just to make sure it's clean, then give fdisk another go. If it fails, re-zero it again, and try to use Windows fdisk (or even Linux) to partition the drive. If neither one succeeds, you know the disk got trashed, and your failure is most likely a coincidence. If one *does* succeed, then save the MBR, put the disk in your FreeBSD box, and edit the existing MBR with the FreeBSD fdisk. -- Andrew Hesford [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message