Solved No-boot disk - how to mount

  • Thread starter Thread starter Deleted member 9563
  • Start date Start date
D

Deleted member 9563

Guest
After upgrading a FreeBSD 9.2-RELEASE system to FreeBSD 10.1-RELEASE, it seemed fine except for Xorg and/or KDE4. All ports were up to date and the machine appeared to run fine without a GUI. However, in the process of fiddling with X and KDE I could suddenly no longer boot the disk. My main interest now, is simply to get data from it. I would be pleased to hear some insights into the output below, and suggestions on how to go forward now.

Here are some things I've done:

- put a working Linux drive in the machine: that works without errors
- put the damaged drive in a USB case and plug it into a working box running FreeBSD 9.2-RELEASE: results below:

Code:
 % dmesg
ugen0.4: <JMicron> at usbus0
umass0: <MSC Bulk-Only Transfer> on usbus0
umass0:  SCSI over Bulk-Only; quirks = 0x0100
umass0:6:0:-1: Attached to scbus6
da0 at umass-sim0 bus 0 scbus6 target 0 lun 0
da0: <WDC WD16 00AAJS-22PSA0 > Fixed Direct Access SCSI-2 device
da0: 40.000MB/s transfers
da0: 152627MB (312581808 512 byte sectors: 255H 63S/T 19457C)
da0: quirks=0x2<NO_6_BYTE>

 %  gpart show da0
=>  63  312581745  da0  MBR  (149G)
  63  1985  - free -  (992k)
  2048  308406272  1  linux-data  [active]  (147G)
  308408320  2046  - free -  (1M)
  308410366  4169730  2  ebr  (2G)
  312580096  1712  - free -  (856k)

 %  ls -l /dev/da*
crw-r-----  1 root  operator  0x87 17 Jan 19:34 /dev/da0
crw-r-----  1 root  operator  0x88 17 Jan 19:34 /dev/da0s1
crw-r-----  1 root  operator  0x89 17 Jan 19:34 /dev/da0s2
crw-r-----  1 root  operator  0x90 17 Jan 19:34 /dev/da0s5

I'm confused as to why I see "linux-data" in there. The drive was all UFS as far as I remember. I've been using is with only FreeBSD for a couple of years. As you can see below, the mount command failed. Using any of the /dev/da* options above did as well.

Code:
 # mount /dev/da0s1 /mnt/SCO
mount: /dev/da0s1: Invalid argument

 # file -s /dev/da0
/dev/da0: x86 boot sector; partition 1: ID=0x83, active, starthead 32, startsector 2048, 308406272 sectors; partition 2:
ID=0x5, starthead 254, startsector 308410366, 4169730 sectors, code offset 0x63

 # file -s /dev/da0s1
/dev/da0s1: Linux rev 1.0 ext4 filesystem data, UUID=49ca75de-799f-4baf-bd43-49d0bc01b270 (extents) (large files) (huge
files)

 # file -s /dev/da0s2
/dev/da0s2: x86 boot sector; partition 1: ID=0x82, starthead 254, startsector 2, 4169728 sectors, extended partition table
(last)\011, code offset 0x0

 # file -s /dev/da0s5
/dev/da0s5: Linux/i386 swap file (new style), version 1 (4K pages), size 521215 pages, no label,
UUID=262f5736-2944-47ac-97b9-aa86318efd13

root@TOP:/mnt # tunefs -p /dev/da0s1
tunefs: /dev/da0s1: could not read superblock to fill out disk

Again, any insights and suggestions would be appreciated. Thanks ~ Ole
 
Thanks wblock. This has been a good lesson for me, but I'm embarrassed to say that the problem turned out to be simpler than I thought. I made a huge mistake. My eyes aren't that good, and I've been ill lately so it was a stupid mistake. Yes, that was a Linux disk because I got mixed up.

I now put in the right disk, and all looks good. It appears all the files are there and I'll just back them up and reinstall FreeBSD 10.1 from scratch instead of fiddling with trying to fix a borked upgrade. I think that is what I should have done to begin with.

This is what I expected to see:
Code:
root@TOP:/mnt # gpart show da0
=>  34  976773101  da0  GPT  (465G)
  34  1024  1  freebsd-boot  (512k)
  1058  41943040  2  freebsd-ufs  (20G)
  41944098  20971520  3  freebsd-swap  (10G)
  62915618  41943040  4  freebsd-ufs  (20G)
  104858658  67108864  5  freebsd-ufs  (32G)
  171967522  20971520  6  freebsd-ufs  (10G)
  192939042  782237696  7  freebsd-ufs  (373G)
  975176738  1596397  - free -  (779M)

And this command works as desired: root@TOP:/mnt # mount /dev/da0p7 /mnt/SCO

I feel much better now. :) Thanks.
 
Back
Top