Mount NTFS partition after resize

I tried to shrink my main NTFS partition from 999GB down to 150GB using ntfsresize and parted.

Now I can’t mount my partition again.

root@ubuntu:/home/ubuntu# mount /dev/sda3 /mnt/windows Failed to read last sector (289062495): Invalid argument HINTS: Either the volume is a RAID/LDM but it wasn't setup yet,    or it was not setup correctly (e.g. by not using mdadm --build ...),    or a wrong device is tried to be mounted,    or the partition table is corrupt (partition is smaller than NTFS),    or the NTFS boot sector is corrupt (NTFS size is not valid). Failed to mount '/dev/sda3': Invalid argument The device '/dev/sda3' doesn't seem to have a valid NTFS. Maybe the wrong device is used? Or the whole disk instead of a partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around? 

After running a search with TestDisk I get a different start/end compared to parted which is quite curious:

Testdisk (after search): start 239616, end 289302112 Parted: start 239616s, end 289062515s

So that suggests the problem is the partition MFT has been wiped or there is a problem with the boot sector? Source

In the Testdisk output before search the error I received:

Error: size boot_sector 289062497 > partition 288822900

Here Testdisk gives size boot_sector 289062497 > partition 288822900

TestDisk output after search:

TestDisk 7.0, Data Recovery Utility, April 2015 Christophe GRENIER <>  Disk /dev/sda - 1000 GB / 931 GiB - CHS 121601 255 63      Partition               Start        End    Size in sectors >P MS Data                     2048     206847     204800 [ESP]  P MS Data                   239616  289302112  289062497  D MS Data               1949329409 1951426560    2097152  D MS Data               1951426560 1953523711    2097152 

Testdisk output before search:

TestDisk 7.0, Data Recovery Utility, April 2015 Christophe GRENIER <>  Disk /dev/sda - 1000 GB / 931 GiB - CHS 121601 255 63 Current partition structure:      Partition                  Start        End    Size in sectors   1 P EFI System                  2048     206847     204800 [EFI system partition] No FAT, NTFS, ext2, JFS, Reiser, cramfs or XFS marker  2 P MS Reserved               206848     239615      32768 [Microsoft reserved partition]  2 P MS Reserved               206848     239615      32768 [Microsoft reserved partition] Error: size boot_sector 289062497 > partition 288822900 No FAT, NTFS, ext2, JFS, Reiser, cramfs or XFS marker  3 P MS Data                   239616  289062515  288822900 [Basic data partition]  3 P MS Data                   239616  289062515  288822900 [Basic data partition]  4 P Unknown               1951426560 1953523711    2097152 [Basic data partition] 

Parted output:

(parted) p                                                                 Model: ATA ST1000LM035-1RK1 (scsi) Disk /dev/sda: 1953525168s Sector size (logical/physical): 512B/4096B Partition Table: gpt Disk Flags:   Number  Start        End          Size        File system  Name                          Flags  1      2048s        206847s      204800s     fat32        EFI system partition          boot, esp  2      206848s      239615s      32768s                   Microsoft reserved partition  msftres  3      239616s      289062515s   288822900s  ntfs         Basic data partition          msftdata  4      1951426560s  1953523711s  2097152s    ntfs         Basic data partition          diag 

Ubuntu Server 18.04 LTS Partition problem during installation

I installed Ubuntu Server 18.04 LTS by using default settings. I have 2 SSD (both 240GB) drives so I decided to choose “Use an entire disk and set up LVM”.

After setting up everything I noticed that there’s only 3.87 GB total space. I’m trying to setup a web server and I need maximum space and I need to use both of the SSDs.

What’s the proper way to have more space?

How to erase one partition not all of the disk in a safe way on ubuntu

Installation type window Ubuntu

I have 2 partitions, my system file, swap.. every thing is on the partition which named now (free space) because I clicked the [-] button. The second partition is the partition where I usually store some important data in and I don’t want to erase it.

What I want to do is to Erase the partition which called (free space) safely, mean if someone installed photoRec for example he will not be able to recover my old files. I found here on this website many answers, but all of what I found guides the user to erase all of his disk; but I don’t want to do that, I just want to erase one partition, because the secret data is stored there (in free space). I don’t know what is the name of this method, maybe it’s replacing the free data on the partition with zeros, (I don’t know but want the safest). Another question: the hacker can’t recover the files on my partition (free space) after erasing it safely even if the another partition (/dev/sda4 ntfs) is still on my device without erasing, true?

Re-using home partition from Ubuntu after I wipe and reinstall Debian

I wanted to install debian but not loose any of my data, was wondering if I could retain the same username meta and the home folder and wipe only my OS partitions.

I know this works when installing ubuntu over ubuntu, just wondering if this could be achieved when switching to debian as well.

I have tried re installing ubuntu by wiping only the OS partitions and leaving the home dir intact.

P.S.: I intend to create the exact same user meta and machine meta to bypass any file ownership and permission issues.

Grub error: no such partition

I was recently dual booting my acer netbook to run ubuntu and windows 7, I ended up deleting the partition for ubuntu and came with the no such partition error. the matter got worse when I decided to wipe the hard drive using gparted live, wich still came up with the grub rescue error. all the other questions that were asked required some sort of operating system. since there is none, I don’t know what to do.

Ubuntu behaves differently(w.r.t. SIS VGA) when installed using ubootin (sharing windows XP) and when installed on a different partition

I am new to ubuntu and extremely sorry if this a repeat query. I tried ubuntu (18.04 LTS)on a laptop(Acer aspire 5000)- AMD turion 64 1.6 ghz, 2 GB ram, 40 GB HD (IDE), SiS VGA. There are two aspects to my query to seek help from the ubuntu community.

1. I tried running ubuntu using unetbootin by installing unetbootin in Win XP. Basically, its a live CD kind (i guess). I followed the steps properly and all went fine. I booted my PC and found out that it is wonderful.

The screen resolution is great in this scenario.

At times – this way ubuntu misses to detect my keyboard. and hence I have to hard restart (by disconnecting the power which is bad).

2. Finding it good i now went ahead to install ubuntu to the unused space on the hard drive of laptop by partitioning it. Installation went fine and then when i rebooted – a. Key board issue was resolved. But, b. The Resolution is 640*480 and it remains so. I did some google and found out that the Sis VGA has an issue i.e. there are no Linux drivers provided by the Manufacturer of Sis VGA.

My Question – Why does screen in the method 1 above comes up so crispy and can we do something to get that same when we go ahead with the 2nd Method.

Thanks Ayt

Can ‘Microsoft basic data’ partition be deleted?

I am want to uninstall ubuntu(16.04), from my dual boot system and probably reinstall ubuntu or install kali(dual boot it with windows). I want to allocate more space to the already existing windows. I have 10 partitions and I want to figure out if any of these partitions can be freed(not necessary for windows) so that I can increase the disk space allocated to windows as well as allocate more storage to Kali.enter image description here

Make a HDD partition work like USB bootable in Ubuntu

How can I make HDD partition work like a iso bootable for a Windows iso?

What I have:

-Ubuntu 16.04 (dev/sda)

-Partition of NTFS (16GB) (dev/sdb3)

-Partition of NTFS (100GB) (dev/sdb2)

-Windows ISO

What I already do:

1) I already have a NTFS partition with 16GB (dev/sdb3)

2) I already extract the files of Windows ISO In the partition (dev/sdb3)

3) I already set the flag “booteable” to the partition (dev/sdb3)

Goal: I want to keep Ubuntu on /dev/sda and install Windows on dev/sdb2, with the partition dev/sdb3 (working like a usb bootable)

Can’t find HDD drives after extend partition of Ubuntu on SSD

I have a micro server, with one SSD and two HDDs. There are windows and Ubuntu on SSD. After the partition of Ubuntu is full, I tried to extend it. Using a live-usb Ubuntu system and GParted, I erase the Windows system and extend the partition of Ubuntu. After that, I manager to boot into Ubuntu but I can’t find my two HDD drives. I have tried sudo fdisk -l and lsblk, only /dev/sda is shown in the result. sda is my SSD driver. Then I reboot and enter into grub command line. I tried ls there, the result is as follows: grub_screenshot As you can see, there are three drivers: hd0,hd1 is my HDD, hd2 is my SSD. But after I enter into the Ubuntu system, I still can’t find hd0 and hd1. Any thoughts about what’s to do next? Thanks!