Re: Partition not showing up in disklabel
On 5/6/06, Nick Holland [EMAIL PROTECTED] wrote: Don't clear anything! Just add it. That is something you have to do, however. Nothing does it automatically for you after the initial install. http://www.openbsd.org/faq/faq14.html#foreignfs Read the whole thing. Carefully. For some reason i missed 14.16, but i'm gratefull for getting pointed at it. And even more gratefull that this wasn't even close to, being as complex an operation is a anticipated. Thank you very much for your help :) (Nick: Sorry for also sending this directly to you) -- Regards Henrik
Partition not showing up in disklabel
Hello there. I have a laptop which dualboots Windows XP and OpenBSD. For each of these i have a partition. Further more i have a partition, which contains somekind of restore-information and at last another partition. The Windows XP-partition is FAT32, the restore-partition is some Compaq-thingie and the last partition is also FAT32. Unfortinately i apparently can not access the second FAT32-partition from OpenBSD, and even after reading the manpages for fdisk(8) and disklabel(8), i haven't found my solution. I fear that i may have missed something very basical somewhere and would really like a hint, for where to go. The FAT32-partition is 3: 0C 3931 0 1 - 4862 254 63 [63151515:14972580 ] Win95 FAT32L which was created _after_ the OpenBSD installation. My poroblem now is, that i haven't been able to find a way to include this to the existing disklabel, without clearing the entire disklabel and manually create it again? Any hint is very welcomming :) $ uname -a OpenBSD compaq.open.bsd 3.9 GENERIC#617 i386 $ sudo fdisk wd0 Password: Disk: wd0 geometry: 4864/255/63 [78140160 Sectors] Offset: 0 Signature: 0xAA55 Starting Ending LBA Info: #: idC H S -C H S [ start: size ] 0: 120 1 1 - 382 254 63 [ 63: 6152832 ] Compaq Diag. 1: 0C 383 0 1 - 2597 254 63 [ 6152895:35583975 ] Win95 FAT32L *2: A6 2598 0 1 - 3930 254 63 [41736870:21414645 ] OpenBSD 3: 0C 3931 0 1 - 4862 254 63 [63151515:14972580 ] Win95 FAT32L $ sudo disklabel wd0 # Inside MBR partition 2: type A6 start 41736870 size 21414645 # /dev/rwd0c: type: ESDI disk: ESDI/IDE disk label: TOSHIBA MK4025GA flags: bytes/sector: 512 sectors/track: 63 tracks/cylinder: 16 sectors/cylinder: 1008 cylinders: 16383 total sectors: 78140160 rpm: 3600 interleave: 1 trackskew: 0 cylinderskew: 0 headswitch: 0 # microseconds track-to-track seek: 0 # microseconds drivedata: 0 16 partitions: # sizeoffset fstype [fsize bsize cpg] a: 20761146 41736870 4.2BSD 2048 16384 328 # Cyl 41405*- 62001 b:653499 62498016swap # Cyl 62002 - 62650* c: 78140160 0 unused 0 0 # Cyl 0 - 77519 i: 615283263 unknown # Cyl 0*- 6104* j: 35583975 6152895 MSDOS # Cyl 6104*- 41405* -- Regards Henrik
Re: Partition not showing up in disklabel
On 5/6/06, Henrik Borgh [EMAIL PROTECTED] wrote: Hello there. I have a laptop which dualboots Windows XP and OpenBSD. For each of these i have a partition. Further more i have a partition, which contains somekind of restore-information and at last another partition. The Windows XP-partition is FAT32, the restore-partition is some Compaq-thingie and the last partition is also FAT32. Unfortinately i apparently can not access the second FAT32-partition from OpenBSD, and even after reading the manpages for fdisk(8) and disklabel(8), i haven't found my solution. I fear that i may have missed something very basical somewhere and would really like a hint, for where to go. The FAT32-partition is 3: 0C 3931 0 1 - 4862 254 63 [63151515:14972580 ] Win95 FAT32L which was created _after_ the OpenBSD installation. My poroblem now is, that i haven't been able to find a way to include this to the existing disklabel, without clearing the entire disklabel and manually create it again? Any hint is very welcomming :) $ uname -a OpenBSD compaq.open.bsd 3.9 GENERIC#617 i386 $ sudo fdisk wd0 Password: Disk: wd0 geometry: 4864/255/63 [78140160 Sectors] Offset: 0 Signature: 0xAA55 Starting Ending LBA Info: #: idC H S -C H S [ start: size ] 0: 120 1 1 - 382 254 63 [ 63: 6152832 ] Compaq Diag. 1: 0C 383 0 1 - 2597 254 63 [ 6152895:35583975 ] Win95 FAT32L *2: A6 2598 0 1 - 3930 254 63 [41736870:21414645 ] OpenBSD 3: 0C 3931 0 1 - 4862 254 63 [63151515:14972580 ] Win95 FAT32L $ sudo disklabel wd0 # Inside MBR partition 2: type A6 start 41736870 size 21414645 # /dev/rwd0c: type: ESDI disk: ESDI/IDE disk label: TOSHIBA MK4025GA flags: bytes/sector: 512 sectors/track: 63 tracks/cylinder: 16 sectors/cylinder: 1008 cylinders: 16383 total sectors: 78140160 rpm: 3600 interleave: 1 trackskew: 0 cylinderskew: 0 headswitch: 0 # microseconds track-to-track seek: 0 # microseconds drivedata: 0 16 partitions: # sizeoffset fstype [fsize bsize cpg] a: 20761146 41736870 4.2BSD 2048 16384 328 # Cyl 41405*- 62001 b:653499 62498016swap # Cyl 62002 - 62650* c: 78140160 0 unused 0 0 # Cyl 0 - 77519 i: 615283263 unknown # Cyl 0*- 6104* j: 35583975 6152895 MSDOS # Cyl 6104*- 41405* You'll have to redo the disklabel but it's not such a horrible experience as you might think. Just do disklabel -e wd0, clear it, and start putting in new lines. Make sure to keep this output so you can put the old partitions back. So long as you are only messing with the disklabel you shouldn't be able to destroy your data (well, data on the windows drives at least) but as always, be careful. -Nick
Re: Partition not showing up in disklabel
Henrik Borgh wrote: Hello there. I have a laptop which dualboots Windows XP and OpenBSD. For each of these i have a partition. Further more i have a partition, which contains somekind of restore-information and at last another partition. The Windows XP-partition is FAT32, the restore-partition is some Compaq-thingie and the last partition is also FAT32. Unfortinately i apparently can not access the second FAT32-partition from OpenBSD, and even after reading the manpages for fdisk(8) and disklabel(8), i haven't found my solution. I fear that i may have missed something very basical somewhere and would really like a hint, for where to go. The FAT32-partition is 3: 0C 3931 0 1 - 4862 254 63 [63151515:14972580 ] Win95 FAT32L which was created _after_ the OpenBSD installation. My poroblem now is, that i haven't been able to find a way to include this to the existing disklabel, without clearing the entire disklabel and manually create it again? Don't clear anything! Just add it. That is something you have to do, however. Nothing does it automatically for you after the initial install. http://www.openbsd.org/faq/faq14.html#foreignfs Read the whole thing. Carefully. If you don't understand, start at the top of FAQ 14, and work back through it. When you understand what is going on (usually indicated by saying to yourself, Oh, I get it! That's cool!), you are ready to do it. As always, have a backup of important data before starting, though if you understand what you are doing, recovery from most errors is pretty easy. You win no points for finding the edge cases, however. Nick.
Re: Partition not showing up in disklabel
Nick Guenther wrote: On 5/6/06, Henrik Borgh [EMAIL PROTECTED] wrote: $ sudo fdisk wd0 Password: Disk: wd0 geometry: 4864/255/63 [78140160 Sectors] Offset: 0 Signature: 0xAA55 Starting Ending LBA Info: #: idC H S -C H S [ start: size ] 0: 120 1 1 - 382 254 63 [ 63: 6152832 ] Compaq Diag. 1: 0C 383 0 1 - 2597 254 63 [ 6152895:35583975 ] Win95 FAT32L *2: A6 2598 0 1 - 3930 254 63 [41736870:21414645 ] OpenBSD 3: 0C 3931 0 1 - 4862 254 63 [63151515:14972580 ] Win95 FAT32L $ sudo disklabel wd0 [Snip disklabel intro] 16 partitions: # sizeoffset fstype [fsize bsize cpg] a: 20761146 41736870 4.2BSD 2048 16384 328 # Cyl 41405*- 62001 b:653499 62498016swap # Cyl 62002 - 62650* c: 78140160 0 unused 0 0 # Cyl 0 - 77519 i: 615283263 unknown # Cyl 0*- 6104* j: 35583975 6152895 MSDOS # Cyl 6104*- 41405* You'll have to redo the disklabel but it's not such a horrible experience as you might think. Just do disklabel -e wd0, clear it, and start putting in new lines. Make sure to keep this output so you can put the old partitions back. I'm sorry, do what, exactly? Clear it? Why would you want to do something like that when the OP would just need to add ONE line. This is what I'd do: sudo disklabel -e wd0, yes, but you just need to copy and change the copied line to meet the parameters of the new partition. Specifically, once in the editor: Find the j: entry from the above disklabel. Copy and put it right below it yyp if you're not very familar with vi. Then change j: to k:, change the size column's value to the size value reported in fdisk, change the offset column's value to the start value as reported by fdisk for that partition. Save and quit. Disklabel will then update the label to make this happen. Then create the mount point directory that you want this filesystem on, if you haven't already done so, then edit your fstab with your favorite editor. Copy and put the mount line from the existing FAT filesystem, then edit the copy's mount directory and slice entries to match the slice you defined (in this example, wd0k). Then reboot to test your changes. Yeah, you could do a mount /mount_point, but it's better to reboot to make sure you get your changes on the next reboot now than when it's really inconvenient to do so. So long as you are only messing with the disklabel you shouldn't be able to destroy your data (well, data on the windows drives at least) This is misleading. The OpenBSD disklabel is EVERYTHING to that OS, you screw it up, game over. It is very possible to toast a FAT32 if you don't get the disklabel set up right. Anytime you mod the i386 partition table or the disklabel assume you might toast EVERYTHING on the drive. That is, have backups, especially if you're learning this stuff. Then again, if the OP only adds one line, rather than rekey the WHOLE DISKLABEL as you are suggesting, this shouldn't be a problem to OpenBSD. but as always, be careful. Indeed. -- Joseph C. Bender jcbender on domain benderhome dot net
Re: Partition not showing up in disklabel
Joseph C. Bender wrote: Nick Guenther wrote: On 5/6/06, Henrik Borgh [EMAIL PROTECTED] wrote: $ sudo fdisk wd0 Password: Disk: wd0 geometry: 4864/255/63 [78140160 Sectors] Offset: 0 Signature: 0xAA55 Starting Ending LBA Info: #: idC H S -C H S [ start: size ] 0: 120 1 1 - 382 254 63 [ 63: 6152832 ] Compaq Diag. 1: 0C 383 0 1 - 2597 254 63 [ 6152895:35583975 ] Win95 FAT32L *2: A6 2598 0 1 - 3930 254 63 [41736870:21414645 ] OpenBSD 3: 0C 3931 0 1 - 4862 254 63 [63151515:14972580 ] Win95 FAT32L $ sudo disklabel wd0 [Snip disklabel intro] 16 partitions: # sizeoffset fstype [fsize bsize cpg] a: 20761146 41736870 4.2BSD 2048 16384 328 # Cyl 41405*- 62001 b:653499 62498016swap # Cyl 62002 - 62650* c: 78140160 0 unused 0 0 # Cyl 0 - 77519 i: 615283263 unknown # Cyl 0*- 6104* j: 35583975 6152895 MSDOS # Cyl 6104*- 41405* You'll have to redo the disklabel but it's not such a horrible experience as you might think. Just do disklabel -e wd0, clear it, and start putting in new lines. Make sure to keep this output so you can put the old partitions back. I'm sorry, do what, exactly? Clear it? Why would you want to do something like that when the OP would just need to add ONE line. This is what I'd do: sudo disklabel -e wd0, yes, but you just need to copy and change the copied line to meet the parameters of the new partition. Specifically, once in the editor: Find the j: entry from the above disklabel. Copy and put it right below it yyp if you're not very familar with vi. Then change j: to k:, change the size column's value to the size value reported in fdisk, change the offset column's value to the start value as reported by fdisk for that partition. Save and quit. Disklabel will then update the label to make this happen. Me, I'd take a closer look at that j OpenBSD partition. It does NOT look like it corresponds to anything in the DOS partitions. Whether or not you redo the disklabel from scratch, the critical operation is writing the disklabel back. This is a place where any slipup, any typo, can do incredible damage. (This is from somebody who LIKES to play with overlapping partitions;) Then create the mount point directory that you want this filesystem on, if you haven't already done so, then edit your fstab with your favorite editor. Copy and put the mount line from the existing FAT filesystem, then edit the copy's mount directory and slice entries to match the slice you defined (in this example, wd0k). Then reboot to test your changes. Yeah, you could do a mount /mount_point, but it's better to reboot to make sure you get your changes on the next reboot now than when it's really inconvenient to do so. So long as you are only messing with the disklabel you shouldn't be able to destroy your data (well, data on the windows drives at least) This is misleading. The OpenBSD disklabel is EVERYTHING to that OS, you screw it up, game over. It is very possible to toast a FAT32 if you don't get the disklabel set up right. Anytime you mod the i386 partition table or the disklabel assume you might toast EVERYTHING on the drive. That is, have backups, especially if you're learning this stuff. Then again, if the OP only adds one line, rather than rekey the WHOLE DISKLABEL as you are suggesting, this shouldn't be a problem to OpenBSD. but as always, be careful. Indeed. -- Joseph C. Bender jcbender on domain benderhome dot net
Re: Partition not showing up in disklabel
On 5/6/06, Tony Abernethy [EMAIL PROTECTED] wrote: Me, I'd take a closer look at that j OpenBSD partition. It does NOT look like it corresponds to anything in the DOS partitions. Whether or not you redo the disklabel from scratch, the critical operation is writing the disklabel back. This is a place where any slipup, any typo, can do incredible damage. (This is from somebody who LIKES to play with overlapping partitions;) $ sudo fdisk wd0 Password: Disk: wd0 geometry: 4864/255/63 [78140160 Sectors] Offset: 0 Signature: 0xAA55 Starting Ending LBA Info: #: idC H S -C H S [ start: size ] 0: 120 1 1 - 382 254 63 [ 63: 6152832 ] Compaq Diag. 1: 0C 383 0 1 - 2597 254 63 [ 6152895:35583975 ] Win95 FAT32L *2: A6 2598 0 1 - 3930 254 63 [41736870:21414645 ] OpenBSD 3: 0C 3931 0 1 - 4862 254 63 [63151515:14972580 ] Win95 FAT32L 16 partitions: # sizeoffset fstype [fsize bsize cpg] a: 20761146 41736870 4.2BSD 2048 16384 328 # Cyl 41405*- 62001 b:653499 62498016swap # Cyl 62002 - 62650* c: 78140160 0 unused 0 0 # Cyl 0 - 77519 i: 615283263 unknown # Cyl 0*- 6104* j: 35583975 6152895 MSDOS # Cyl 6104*- 41405* j is the same as partition 1, the windows install. Then create the mount point directory that you want this filesystem on, if you haven't already done so, then edit your fstab with your favorite editor. Copy and put the mount line from the existing FAT filesystem, then edit the copy's mount directory and slice entries to match the slice you defined (in this example, wd0k). Then reboot to test your changes. Yeah, you could do a mount /mount_point, but it's better to reboot to make sure you get your changes on the next reboot now than when it's really inconvenient to do so. So long as you are only messing with the disklabel you shouldn't be able to destroy your data (well, data on the windows drives at least) This is misleading. The OpenBSD disklabel is EVERYTHING to that OS, you screw it up, game over. It is very possible to toast a FAT32 if you don't get the disklabel set up right. Anytime you mod the i386 partition table or the disklabel assume you might toast EVERYTHING on the drive. That is, have backups, especially if you're learning this stuff. True, misleading. I was thinking you shouldn't be able to actually destroy any data [so long as you realize your mistake in time] Then again, if the OP only adds one line, rather than rekey the WHOLE DISKLABEL as you are suggesting, this shouldn't be a problem to OpenBSD. Right, that was stupid of me.
Re: Partition not showing up in disklabel
Nick Guenther wrote: On 5/6/06, Tony Abernethy [EMAIL PROTECTED] wrote: Me, I'd take a closer look at that j OpenBSD partition. It does NOT look like it corresponds to anything in the DOS partitions. Whether or not you redo the disklabel from scratch, the critical operation is writing the disklabel back. This is a place where any slipup, any typo, can do incredible damage. (This is from somebody who LIKES to play with overlapping partitions;) $ sudo fdisk wd0 Password: Disk: wd0 geometry: 4864/255/63 [78140160 Sectors] Offset: 0 Signature: 0xAA55 Starting Ending LBA Info: #: idC H S -C H S [ start: size ] 0: 120 1 1 - 382 254 63 [ 63: 6152832 ] Compaq Diag. 1: 0C 383 0 1 - 2597 254 63 [ 6152895:35583975 ] Win95 FAT32L *2: A6 2598 0 1 - 3930 254 63 [41736870:21414645 ] OpenBSD 3: 0C 3931 0 1 - 4862 254 63 [63151515:14972580 ] Win95 FAT32L 16 partitions: # sizeoffset fstype [fsize bsize cpg] a: 20761146 41736870 4.2BSD 2048 16384 328 # Cyl 41405*- 62001 b:653499 62498016swap # Cyl 62002 - 62650* c: 78140160 0 unused 0 0 # Cyl 0 - 77519 i: 615283263 unknown # Cyl 0*- 6104* j: 35583975 6152895 MSDOS # Cyl 6104*- 41405* j is the same as partition 1, the windows install. You're right. Getting cross-eyed in my old age. Then create the mount point directory that you want this filesystem on, if you haven't already done so, then edit your fstab with your favorite editor. Copy and put the mount line from the existing FAT filesystem, then edit the copy's mount directory and slice entries to match the slice you defined (in this example, wd0k). Then reboot to test your changes. Yeah, you could do a mount /mount_point, but it's better to reboot to make sure you get your changes on the next reboot now than when it's really inconvenient to do so. So long as you are only messing with the disklabel you shouldn't be able to destroy your data (well, data on the windows drives at least) This is misleading. The OpenBSD disklabel is EVERYTHING to that OS, you screw it up, game over. It is very possible to toast a FAT32 if you don't get the disklabel set up right. Anytime you mod the i386 partition table or the disklabel assume you might toast EVERYTHING on the drive. That is, have backups, especially if you're learning this stuff. True, misleading. I was thinking you shouldn't be able to actually destroy any data [so long as you realize your mistake in time] Critical words. realize. in time. Then again, if the OP only adds one line, rather than rekey the WHOLE DISKLABEL as you are suggesting, this shouldn't be a problem to OpenBSD. Right, that was stupid of me. However, even if the edit is done with just a single line, there is something to be said for relaying out the label from scratch. You get a lot of real problems from But I didn't change anything Best advice on this kind of stuff probably from Nick Holland. Treat filesystem layout etc stuff with a lot of respect. There are ways it can bite you in places you never knew you had places. Operating Systems tend to have error-recovery mechanisms. Probably fairly easy to set up something that will work perfectly until the error-recover mechanisms come into play. And then the code that is supposed to correct stuff actually wrecks the joint. This kind of code is diabolically hard to test.