Page 1 of 3 123 LastLast
Results 1 to 10 of 22

Thread: Hard disk disappeared from ubuntu still visible in Win 7 dual boot

  1. #1
    Join Date
    Nov 2005
    Beans
    13

    Hard disk disappeared from ubuntu still visible in Win 7 dual boot

    Hello – help appreciated

    I inadvertently clicked a “Restore disk image” pop-up window and now one of my hard disks seems to have disappeared. I was installing a Raspberry Pi Naturewatch camera installation program and the D: drive (sdc) seems to have been replaced by ‘boot’ and ‘rootfs’ (both related to Naturewatch) in Other Locations>On This Computer.

    I’m dual booting Ubuntu with Windows7 and the drive is visible from Windows, which showed an empty disk which allowed me to copy a file to it. The relevant items of an lshw listing seem to be:


    Code:
    /0/3/0.0.0         /dev/sdc   disk           1TB WDC WD10EARX-00N [this is not visible] 
    /0/3/0.0.0/1       /dev/sdc1  volume         43MiB Windows FAT volume
    /0/3/0.0.0/2       /dev/sdc2  volume         4241MiB EXT4 volume
        
    /0/5/0.0.0         /dev/sdd   disk           1TB WDC WD10EZRX-00A
    /0/5/0.0.0/1       /dev/sdd1  volume         931GiB Extended partition
    /0/5/0.0.0/1/5     /dev/sdd5  volume         931GiB Windows NTFS volume [this is the one that is visible] 
     
    ... and ... 
    
    Disk /dev/sdb: 223.6 GiB, 240057409536 bytes, 468862128 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: dos
    Disk identifier: 0x7b0ad8dd
    
    Device     Boot  Start       End   Sectors   Size Id Type
    /dev/sdb1  *      2048    206847    204800   100M  7 HPFS/NTFS/exFAT
    /dev/sdb2       206848 468858879 468652032 223.5G  7 HPFS/NTFS/exFAT
    
    
    Disk /dev/sdc: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
    Disklabel type: dos
    Disk identifier: 0x667b56cc
    
    Device     Boot Start     End Sectors  Size Id Type
    /dev/sdc1        8192   96453   88262 43.1M  c W95 FAT32 (LBA)
    /dev/sdc2       98304 8783871 8685568  4.1G 83 Linux
    
    
    Disk /dev/sdd: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
    Disklabel type: dos
    Disk identifier: 0xa69d1928
    
    Device     Boot Start        End    Sectors   Size Id Type
    /dev/sdd1        1985 1953519615 1953517631 931.5G  f W95 Ext'd (LBA) 
    /dev/sdd5        2048 1953519615 1953517568 931.5G  7 HPFS/NTFS/exFAT 
    
    Partition 1 does not start on physical sector boundary.
    Is the drive just unmounted? And how can I get it back – anyone know?

    Thanks
    Last edited by ajgreeny; 4 Weeks Ago at 12:14 PM. Reason: Quote tags changed to Code tags

  2. #2
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Hard disk disappeared from ubuntu still visible in Win 7 dual boot

    Copying to it may have been a mistake as it overwrote something.

    What does testdisk show for sdc drive?
    It looks like you may have installed your Nature Watch to drive totally overwriting it.

    If deeper search shows files you want to recover, immediately copy them to another drive. You may not get them again.

    download TestDisk, in most Linux repositories, so you can also download from anUbuntu install.
    http://www.cgsecurity.org/wiki/TestDisk
    Testdisk Instructions, new versions use sectors, old ones were CHS
    http://www.cgsecurity.org/wiki/TestDisk_Step_By_Step
    http://www.cgsecurity.org/wiki/Menu_Analyse
    For more info on UEFI boot install & repair - Regularly Updated :
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  3. #3
    Join Date
    Nov 2005
    Beans
    13

    Re: Hard disk disappeared from ubuntu still visible in Win 7 dual boot

    Thank you I shall go off and give that a study.

  4. #4
    Join Date
    Nov 2005
    Beans
    13

    Re: Hard disk disappeared from ubuntu still visible in Win 7 dual boot

    Thanks again, this looks promising. Sorry about the delay - I had problems getting into Testdisk (actually very simple, caused by my terminal stupidity).

    I had all my data backed up so no problem there. The disk shows up fine, when I look it says:

    Current partition structure:
    Partition Start End Size in sectors

    Warning: number of heads/cylinder mismatches 64 (FAT) != 255 (HD)
    Warning: number of sectors per track mismatches 32 (FAT) != 63 (HD)
    1 P FAT32 LBA 0 130 3 6 1 1 88262 [boot]
    2 P Linux 6 30 25 546 196 34 8685568 [rootfs]
    No partition is bootable

    so is showing up the boot and rootfs that display on On This Computer. As you say, I've installed the program onto that disk which wasn't the intention at all

    Any further thoughts?

  5. #5
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Hard disk disappeared from ubuntu still visible in Win 7 dual boot

    You may need chkdsk from Windows on the FAT32 partition.
    Or dosfsck on the FAT32 partition from Linux.

    Must be unmounted
    sudo dosfsck -t -a -w /dev/sdc1
    The -a seems to help in clearing dirty bit
    https://bbs.archlinux.org/viewtopic.php?id=164185

    If that was your Linux drive, you need to totally reinstall & restore from backups.

    You also show MBR(msdos) partitions on all drives. I now only suggest MBR, for those with older systems that have to boot Windows.
    Windows requires MBR for BIOS boot & requires gpt for UEFI boot. Ubuntu can boot from gpt drives with either BIOS or UEFI, if you have correct supporting partitions for booting. With BIOS, you need a bios_grub, 1MB unformatted or an ESP - efi system partition, FAT32 3000 to 500MB with esp & boot flags.
    http://www.rodsbooks.com/gdisk/whatsgpt.html
    For more info on UEFI boot install & repair - Regularly Updated :
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  6. #6
    Join Date
    Nov 2005
    Beans
    13

    Re: Hard disk disappeared from ubuntu still visible in Win 7 dual boot

    From Linux dosfsck I get:

    fsck.fat 4.1 (2017-01-24)
    /dev/sdc1: 170 files, 44282/86872 clusters

    When you say was that your Linux drive do you mean did it boot from that drive? If so, no - it was just a data drive and I have backup.

    Not sure how to do a reinstall from Linux. Could I go into Windows and format the drive since it's visible as a single drive there? I'll copy all its previous contents across no problem. Otherwise I'm not sure how I'd reinstall other than format from Linux (I didn't actually set up the dual-boot on the computer, a friend did it) . Should I format in NTFS or FAT32 or ext-4 (I only really need to access it from linux)? With something like unmount it and do a

    sudo mkfs -t ntfs /dev/sdc1

    You're scaring me with MBR and gpt I'm very basic and reluctant to change anything fundamental in case I screw it all up. I mainly use the computer for word processing/spreadsheet/browsing/e-mails with the odd bit of graphics, and it does work well when I don't mess up installing new software (sorry and help definitely appreciated).
    Last edited by mitch beedie; 4 Weeks Ago at 01:15 AM.

  7. #7
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Hard disk disappeared from ubuntu still visible in Win 7 dual boot

    I have been using gpt since 2010. I converted one drive to gpt and installed Ubuntu. Other drive was still MBR with XP.
    Once I retired XP, I started converting all new or totally repartitioned drives to gpt.
    Not sure I would suggest converting in place unless you have good backup. And you should have good backups anyway.

    I also suggest only using Windows tools for Windows and use Linux tools for Linux.
    If you are going to reinstall, you do not have to reformat as ext4 as you do that during install. Only if converting may you then have to create new partitions.

    Only use NTFS if you have Windows. Otherwise use ext4 for Linux.
    The FAT32 is only used with newer UEFI systems for the ESP- efi system partition used for UEFI booting.
    Mixing UEFI & BIOS is not recommended, unless advanced user and wanting to experiment.
    For more info on UEFI boot install & repair - Regularly Updated :
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  8. #8
    Join Date
    Nov 2005
    Beans
    13

    Re: Hard disk disappeared from ubuntu still visible in Win 7 dual boot

    Thanks again - can I summarize/check?

    sda is a 120 Gb internal SSD which boots to linux
    sdb is a 240 Gb internal SSD which boots to Windows7 (dos)

    I’m reluctant to reinstall linux if it would affect these two, since both of them work really well (not a huge amount of free space on the linux SSD but I can live with that). The other three are hard disks:

    sdc is a 1 Tb internal hard disk that was called Data that I held all my personal/work information on (dos) that is now wiped
    sdd is a 1 Tb internal hard disk that is called Backup disk that backs up Data (dos)
    sde is a 1 TB external hard disk that also backs up Data

    I’m really not sure how I’d go about reinstalling the whole system - can I really not unmount sdc and do:

    sudo mkfs.ext4 /dev/sdc1 (sdc1 rather than just sdc?) to format just that hard drive if it needs to be ext4?

    sorry to be a pain

  9. #9
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Hard disk disappeared from ubuntu still visible in Win 7 dual boot

    You create partitions on a drive, then format partitions.

    I normally use gparted for both, but then using Something Else typically end up formatting it as ext4 again.
    If multiple drives only use Something Else to install.

    And grub in BIOS mode defaults to installing grub to first drive, usually sda, or first NVMe drive, but with BIOS you can choose if you use Something else using the combo box for boot loader install drive.

    If UEFI Ubuntu's Ubiquity installer only installs grub to first drive, even though it still shows the options on where to install.
    I do prefer to then have install on first drive. That typically is determined by BIOS/UEFI by SATA port, or sda is SATA0, sdb is SATA1, etc.
    But when I plug in a flash drive that is sdf, on reboot if still plugged in, it becomes sda and every other drive changes up one letter. That is why UUID or labels are used to know which drive is which for fstab and other entries.
    For more info on UEFI boot install & repair - Regularly Updated :
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  10. #10
    Join Date
    Nov 2005
    Beans
    13

    Re: Hard disk disappeared from ubuntu still visible in Win 7 dual boot

    Well that went well .

    I edited fstab and then the computer didn’t boot any more. When I booted I was asked for the root password which hadn’t been set. I tried setting it using a live ubuntu usb and it seemed to work but then didn’t. But anyway.

    I’ve installed ubuntu 20.04 on sdd (sata 3, 1 TB hard disk) from a live usb because I’ve been meaning to do that for a while and that seemed the only disk with enough space. I’ve recovered nearly everything from the old setup (must say I’m impressed with how easy it is to recover thunderbird and firefox settings and information). I’ve ordered a new 240MB SSD and 2 TB hard disk because both drives were getting a bit full anyway.

    So the plan is to
    1) take out the 120 MB ssd from sda (sata 0), insert my new 240MB ssd, install 20.04 on it, and copy my thunderbird and firefox (etc) personal data to it
    2) leave sdb (sata 1) alone and hope that I will be able to still boot into Win7 from it,
    3) then (unless this isn’t a good idea) I’d ideally physically move the 1 TB hdd (sata 3) cable to the sata 2 socket to become my main 1TB data hard drive, and format it to remove the ubuntu 20.04 now installed,
    4) insert the new 2TB hard disk to become sata 3 as backup,
    5) copy all my data to the 1TB sdc hard drive, and back it up on the new 2TB sdd hard drive.

    …. and breathe…

    Does this make sense, and if I’m reinstalling sda from a live ubuntu usb will that solve the MBR problems you highlighted above? I have another computer I can use the old SSD and hard disk on so they won’t be wasted.

    I’m hoping the new sda drive will recognize the other drives. I’m a bit confused as to why the new ubuntu installation on sdd still doesn’t see sdc, but hopefully reinstalling sda with a live ubuntu usb will solve this.

Page 1 of 3 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •