[SOLVED] Grub rescue problem (no such device+unknown file system)

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help
Manny_F
Level 1
Level 1
Posts: 21
Joined: Wed Sep 04, 2019 11:08 am

Re: Grub rescue problem (no such device+unknown file system)

Post by Manny_F » Sun Sep 15, 2019 11:37 pm

Aaaaand now I feel like a complete fool for not asking about that possibility before. Thanks for bringing it up, pbear.

Sda does have more than 200 GB to spare, so I don't see why I shouldn't try it out.
The only "but" I can think of is that Linux installation, for some reason, fails to bring any data regarding available space on either sda and sda1, but I assume this problem can be sorted out handily using Gparted?

Another thing that comes to mind is: if this works, should I keep the ext4 partitions in sdb (or unify them on a single one) for the purposes of storing programs used by Linux or should I reunite them with their NTFS relatives?
By the way, I'll mention the elephant in the room. Your Win7 sunsets in a few months.
That's, pretty much, the reason I'm here. I was about to happily transition to Win10, but some less than stellar opinions about it and some research about the advantages and capabilities of Linux made me change my mind. Nevertheless, I want to keep Win7 as a "safe space" while I grow confident enough with Linux until I can adopt it full time.

User avatar
pbear
Level 8
Level 8
Posts: 2414
Joined: Wed Jun 21, 2017 12:25 pm
Location: San Francisco

Re: Grub rescue problem (no such device+unknown file system)

Post by pbear » Mon Sep 16, 2019 12:00 am

Manny_F wrote:
Sun Sep 15, 2019 11:37 pm
The only "but" I can think of is that Linux installation, for some reason, fails to bring any data regarding available space on either sda and sda1, but I assume this problem can be sorted out handily using Gparted?
Yes, GParted can handle this. Or you could use Disk Management in Windows, if you're already familiar. (If not, let's use GParted.) So, for starters, when you say 200 GB to spare, I hope that means leaving Windows with plenty of unused space (at least 20%). Nearly full partitions aren't a good idea. Please clarify. Also, how would you feel if I tried to convince you to use a root-only partition scheme for your first Mint system?
Another thing that comes to mind is: if this works, should I keep the ext4 partitions in sdb (or unify them on a single one) for the purposes of storing programs used by Linux or should I reunite them with their NTFS relatives?
Let's just leave them be for right now. That can be modified easily post-installation, once all the other pieces stop moving. Wouldn't use for apps (those go in root), but might be useful for Timeshift. We can burn that bridge when we get to it.
Time flies like an arrow. Fruit flies like a banana.
If your problem has been solved, please edit the thread title.

Manny_F
Level 1
Level 1
Posts: 21
Joined: Wed Sep 04, 2019 11:08 am

Re: Grub rescue problem (no such device+unknown file system)

Post by Manny_F » Mon Sep 16, 2019 12:27 am

pbear wrote:
Mon Sep 16, 2019 12:00 am
[ So, for starters, when you say 200 GB to spare, I hope that means leaving Windows with plenty of unused space (at least 20%). Nearly full partitions aren't a good idea. Please clarify. Also, how would you feel if I tried to convince you to use a root-only partition scheme for your first Mint system?
Well, there is 227 GB free in sda at the moment, and a lot of space is also occupied by non-critical stuff that can be deleted or moved to sdb if necessary (TBH, my computer was, space-wise, a mess up until a month ago, when I got my act together and started making some clean-up in preparation for all this, and there's still a lot of crap to get rid of). It's not as much as the 500 GB I could dedicate exclusively to Linux in sdb, but it'll do, I suppose.

Regarding your second question... I don't know what to say, really. I see some divided opinions on the matter. I guess as long as that it doesn't implies a big downside, I'll ride along.

User avatar
pbear
Level 8
Level 8
Posts: 2414
Joined: Wed Jun 21, 2017 12:25 pm
Location: San Francisco

Re: Grub rescue problem (no such device+unknown file system)

Post by pbear » Mon Sep 16, 2019 1:16 am

Manny_F wrote:
Mon Sep 16, 2019 12:27 am
Well, there is 227 GB free in sda at the moment.
Not much advantage of 200 GB over 100 GB, and recall I said 60 GB would be enough. So I suggest you do 100 GB, bearing in mind you're going to leave the data files on the Windows system, where they can be accessed easily by Mint.
Regarding your second question... I don't know what to say, really. I see some divided opinions on the matter. I guess as long as that it doesn't implies a big downside, I'll ride along.
Yes, there are divided opinions. For that matter, there are advantages to separate home and/or data partitions. Indeed, that's what I do now (both home and data). Starting out, though, I used root-only and recommend you do the same.

Do you have time to do this over the next day or so? If you'd rather wait a few days (or more), that's okay too.
Time flies like an arrow. Fruit flies like a banana.
If your problem has been solved, please edit the thread title.

Manny_F
Level 1
Level 1
Posts: 21
Joined: Wed Sep 04, 2019 11:08 am

Re: Grub rescue problem (no such device+unknown file system)

Post by Manny_F » Mon Sep 16, 2019 1:55 am

I think I'll have more than enough time tomorrow.

So, if I'm not mistaken, this would be my to-do list:

1-Prepare a 100 GB ext4 partition inside sda.

2-Install Linux, choose "something else", assign the aforementioned partition the root mount point (“/”).

3-Proceed with install.

Anything else to consider?

User avatar
pbear
Level 8
Level 8
Posts: 2414
Joined: Wed Jun 21, 2017 12:25 pm
Location: San Francisco

Re: Grub rescue problem (no such device+unknown file system)

Post by pbear » Mon Sep 16, 2019 2:29 am

Yup, that's the drill. A few tips.

1. When shrinking sda1 (the Windows partition), you probably will find it easiest to use the slider on the graphic representation of the device, rather than entering values in the numeric boxes. Which is to say, that's been my experience.

2. When creating the new Mint partition (which will become sda2), notice the Label field and assign "Mint-Root" (with a hyphen). This will be handy in future when referring to the partition in Terminal commands.

3. When running the installer, don't check the format box (you will have done that already in GParted). Recall that you won't see the mount option until you have designated the partition "Use as" ... ext4 file system.

4. Assign sda (not sda1) as destination for the bootloader. Bear in mind that, if this doesn't work, you will have to repair the Windows bootloader again.

5. On boot, you may find Windows isn't listed in Grub. To fix, boot Mint, open Terminal and run sudo update-grub.

Good luck. And notice your prior efforts haven't been for naught. You have a pretty good notion now of how this works.
Time flies like an arrow. Fruit flies like a banana.
If your problem has been solved, please edit the thread title.

Manny_F
Level 1
Level 1
Posts: 21
Joined: Wed Sep 04, 2019 11:08 am

Re: Grub rescue problem (no such device+unknown file system)

Post by Manny_F » Mon Sep 16, 2019 11:29 pm

Well, shoot. Nothing is ever easy. Gparted found 5 bad sectors in sda1. I ran CHDSK /f /r, which took a good few hours, and after that it still found the bad sectors.

I guess I could try to pretend nothing of that happened and just create the partition in Windows Disk Manager? In any case, before that I'll try and move as many "must have"-type files as possible to /sdb/ in case the worst case scenario happens.

Chances are this is just the result of wear and tear AND the highly unreliable power grid of this region (this machine has experienced seven straight years of brownouts and blackouts, and while I do have an UPS, I've only managed to replace its batteries when I was able to afford it) and not some looming catastrophic event, but I want to be on the safe side.

User avatar
pbear
Level 8
Level 8
Posts: 2414
Joined: Wed Jun 21, 2017 12:25 pm
Location: San Francisco

Re: Grub rescue problem (no such device+unknown file system)

Post by pbear » Tue Sep 17, 2019 12:14 am

Manny_F wrote:
Mon Sep 16, 2019 11:29 pm
I guess I could try to pretend nothing of that happened and just create the partition in Windows Disk Manager?
Alas, no. You can use Windows tools to shrink sda1, but Windows can't create an ext4 partition, which is what you need for Mint.

Not sure where you go from here. Bad sectors isn't a problem I've run into before.
Time flies like an arrow. Fruit flies like a banana.
If your problem has been solved, please edit the thread title.

Manny_F
Level 1
Level 1
Posts: 21
Joined: Wed Sep 04, 2019 11:08 am

Re: Grub rescue problem (no such device+unknown file system)

Post by Manny_F » Tue Sep 17, 2019 12:17 am

Maybe if I create the partition on Windows Disk Manager, and then format it and make it an ext4 in Gparted? Unless the bad sectors are inside the new 100 GB partition, it should be feasible, right?

User avatar
pbear
Level 8
Level 8
Posts: 2414
Joined: Wed Jun 21, 2017 12:25 pm
Location: San Francisco

Re: Grub rescue problem (no such device+unknown file system)

Post by pbear » Tue Sep 17, 2019 12:23 am

I'm pretty sure the worst that would happen is that it might not work. Haven't tried, though, so can't vouch for it without hesitation. By the way, what is Windows Disk Manager? Been a while since I ran Win7. The tool I remember (and the one I still use in Win10) is Disk Management.
Time flies like an arrow. Fruit flies like a banana.
If your problem has been solved, please edit the thread title.

Manny_F
Level 1
Level 1
Posts: 21
Joined: Wed Sep 04, 2019 11:08 am

Re: Grub rescue problem (no such device+unknown file system)

Post by Manny_F » Tue Sep 17, 2019 12:32 am

Sorry, it's the very same tool you mention, but in Spanish it is often colloquially known as "Administrador de Discos" (literally "Disk Manager"), so I'm used to call it that way instead, :lol:

I'll give it a shot and report back, after I move some stuff around. Thanks for not giving up.

deepakdeshp
Level 16
Level 16
Posts: 6059
Joined: Sun Aug 09, 2015 10:00 am

Re: Grub rescue problem (no such device+unknown file system)

Post by deepakdeshp » Tue Sep 17, 2019 4:34 am

If I have helped you solve a problem, please add [SOLVED] to your first post title, it helps other users looking for help, and keeps the forum clean.
Regards,
Deepak

I am using Mint 19.2 Cinnamon 64 bit with AMD A8/7410 processor . Memory 8GB

Manny_F
Level 1
Level 1
Posts: 21
Joined: Wed Sep 04, 2019 11:08 am

Re: Grub rescue problem (no such device+unknown file system)

Post by Manny_F » Tue Sep 17, 2019 2:32 pm

Thanks, I followed instructions, but it gave me back this:

Code: Select all

mint@mint:~$ sudo e2fsck -cfpv /dev/sda1 
e2fsck: Bad magic number in super-block while trying to open /dev/sda1
/dev/sda1: 
The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem.  If the device is valid and it really contains an ext2/ext3/ext4
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
    e2fsck -b 8193 <device>
 or
    e2fsck -b 32768 <device>

/dev/sda1 contains a ntfs file system
Should I enter any of those two commands (e2fsck -b 8193 or e2fsck -b 32768) in the terminal? If so, do I need to add -cfpv again? And where (before or after the "superblock")?

User avatar
pbear
Level 8
Level 8
Posts: 2414
Joined: Wed Jun 21, 2017 12:25 pm
Location: San Francisco

Re: Grub rescue problem (no such device+unknown file system)

Post by pbear » Tue Sep 17, 2019 2:44 pm

I think Deepak didn't realize we're talking about an NTFS partition. I'm pretty sure fsck isn't able to repair an NTFS partition. Let's go back to the other plan. Try using Windows' disk manager to shrink sda1 (which to it will be drive C:). Then, what the heck, use Windows to create a new partition (which it likely will label E: or F:). Then, as you suggested earlier, switch back to the live session and with GParted reformat the new sda2.
Time flies like an arrow. Fruit flies like a banana.
If your problem has been solved, please edit the thread title.

User avatar
Spearmint2
Level 16
Level 16
Posts: 6876
Joined: Sat May 04, 2013 1:41 pm
Location: Maryland, USA

Re: Grub rescue problem (no such device+unknown file system)

Post by Spearmint2 » Tue Sep 17, 2019 3:02 pm

Code: Select all

info ntfsfix
can fix some NTFS partition problems related to Linux accessibility.
All things go better with Mint. Mint julep, mint jelly, mint gum, candy mints, pillow mints, peppermint, chocolate mints, spearmint,....

User avatar
pbear
Level 8
Level 8
Posts: 2414
Joined: Wed Jun 21, 2017 12:25 pm
Location: San Francisco

Re: Grub rescue problem (no such device+unknown file system)

Post by pbear » Tue Sep 17, 2019 3:51 pm

Spearmint2 wrote:
Tue Sep 17, 2019 3:02 pm

Code: Select all

info ntfsfix
can fix some NTFS partition problems related to Linux accessibility.
Useful to know, thanks.
Time flies like an arrow. Fruit flies like a banana.
If your problem has been solved, please edit the thread title.

Manny_F
Level 1
Level 1
Posts: 21
Joined: Wed Sep 04, 2019 11:08 am

Re: Grub rescue problem (no such device+unknown file system)

Post by Manny_F » Wed Sep 18, 2019 12:08 am

Well, I'll be darned. It actually worked! I didn't even needed to update grub to detect Windows 7.

Granted, Disk Management didn't allowed me to create a partition bigger than 60 GB, but since it was within the numbers pbear gave me, I went with it and now I'm writing this reply inside Mint.

A big thanks for everyone who posted in the thread. Your dedication and patience are commendable.

And now, for the real fun stuff... ¡Learning to use Linux (as opposed to install it)!

User avatar
pbear
Level 8
Level 8
Posts: 2414
Joined: Wed Jun 21, 2017 12:25 pm
Location: San Francisco

Re: [SOLVED] Grub rescue problem (no such device+unknown file system)

Post by pbear » Wed Sep 18, 2019 12:29 am

Congratulations!

Interesting about the partition size limit. Don't think that's intrinsic. Suspect instead that it's related to the bad sectors problem. Anyhoo, yes, 60 GB will be enough. You can make it even easier by setting up a Timeshift partition on sdb (has to be formatted ext4). Make it at least 40 GB; I use 60 GB so I don't have to worry about it filling up. BTW, you don't have to do this, i.e., you can leave snapshots in root, but then you have to pay attention to what Timeshift is doing, even use only manual snapshots. The big advantage of a separate Timeshift partition is that it's basically set and forget.

Another thing to consider. As mentioned when I said 60 GB would be enough, part of the strategy is that you leave all data files where they are now, on the Windows partition (aka the C: drive). You can mount that manually by opening File Manager and clicking Windows in the left pane. Or you can set it to mount automatically by editing a configuration file. If you want to do this now, I can walk you through it. If you'd rather leave it for another day, that's fine but in that case open a new thread when you're ready.

Then, definitely down the road, another thing you might want to explore is using VirtualBox to set up Win10 as a virtual machine. You're probably going to want this once Win7 goes end-of-life. Notably, you would put the virtual machine on sdb (VBox itself would go in root). I'm only mentioning this now because splitting VMs to a separate drive isn't something you're likely to see mentioned anywhere, but I can tell you it works because I've done it.

Anyhoo, have fun with your new toy and enjoy the adventure.
Time flies like an arrow. Fruit flies like a banana.
If your problem has been solved, please edit the thread title.

Manny_F
Level 1
Level 1
Posts: 21
Joined: Wed Sep 04, 2019 11:08 am

Re: [SOLVED] Grub rescue problem (no such device+unknown file system)

Post by Manny_F » Wed Sep 18, 2019 1:12 am

Thanks for the good wishes, pbear!
Interesting about the partition size limit. Don't think that's intrinsic. Suspect instead that it's related to the bad sectors problem.
For what I've read, it's a limitation related to Windows writing data in later sectors of the disk. In some rare cases it won't even let you shrink at all. Apparently it is possible to increase shrinkable size through defrag, deactivating system restore, etc. But I honestly just wanted to get over with this and see if Linux worked.
If you want to do this now, I can walk you through it. If you'd rather leave it for another day, that's fine but in that case open a new thread when you're ready.
Please do, I've still got some time to spare. Tomorrow at noon I leave for work and then it's Work and Worry for me till next Monday.
Then, definitely down the road, another thing you might want to explore is using VirtualBox to set up Win10 as a virtual machine
I'll look into it. No experience with virtual machines but they seem to make for an intriguing and exciting learning prospect.

User avatar
pbear
Level 8
Level 8
Posts: 2414
Joined: Wed Jun 21, 2017 12:25 pm
Location: San Francisco

Re: [SOLVED] Grub rescue problem (no such device+unknown file system)

Post by pbear » Wed Sep 18, 2019 2:57 am

I'm going to include instructions for the Timeshift partition, as I think you should do that, but it's your decision. Open Firefox and navigate to this thread for reference. Use copy and paste for all the commands. Typos usually are fatal in Linux. Not to the system, but the commands won't work. Most of this is based on a tutorial by erstwhile much-respected forum member gold_finger.

1. Install GParted. Included in the live session but not the installed system. Several ways to install apps in Mint, including Software Manager and Synaptic Package Manager. When I know the command name, I prefer Terminal. So open Terminal, click to expand to full screen and copy in the following command: apt install gparted. apt in Mint doesn't require sudo (Ubuntu does), but you'll be asked for your password. This is the same password you set up when you installed the system. Leave Terminal open.

2. Create Timeshift partition. Open GParted. It's the same app you used before, except now you'll be prompted for your password. Switch to sdb. If you haven't already, delete all the old Mint partitions from the aborted installation. Click Partition > New. Size is specified in MiB. For round numbers of GiB, multiply by 1024. So, 60 GiB = 61440 MiB. Format ext4. Label = Timeshift. Close GParted.

3. Set up mount points. You're going to need two, one for Timeshift and another for the Windows partition. Switch back to Terminal. Run sudo mkdir /mnt/Timeshift, then sudo mkdir /mnt/Windows. Depending on how long you spent in GParted, you may not even need to enter your password again. Each time you do covers you for fifteen minutes. Both mount points will be "owned" by root. You want the Windows partition to be owned by you as user. To do that, run sudo chown -R manny /mnt/Windows. (Note: Modify if that's not your user name on the system.)

4. Look up the UUIDs of the Timeshift and Windows partitions with sudo blkid.

5. Edit fstab. This is the configuration file which mounts partitions at boot. See Ubuntu Help. Run xed admin:///etc/fstab. You'll be asked for your password, twice. (This procedure isn't needed to edit ordinary files, only system files.) xed is a simple text editor. Will open with the current text of fstab. Go to the end of the file and hit Enter to get a new line. (Notice all the entries are two lines, one with # in front which explains what the next line is for, then a second with a bunch of inscrutable settings. Welcome to Linux! You're going to add two more groups and they should look like this:
# Mount Timeshift partition under /mnt/Timeshift
UUID=copy-from-blkid /mnt/Timeshift ext4 defaults 0 2

# Mount Windows partition under /mnt/Windows
UUID=copy-from-blkid /mnt/Windows ntfs-3g defaults,windows_names,locale=en_US.utf8 0 0
Save the file. Exit xed, which will return you to Terminal. You'll see a few warnings, e.g., "specified location is not mounted." Ignore them.

6. Confirm. Still in Terminal, run sudo mount -a. If no error code, you're good. You can confirm by opening File Manager, click File System, then mnt. Click on the Windows folder. If you can see files, you're definitely good.

7. Symlink Windows into /home. You don't want to have to go through all that to open Windows files. Solution is a link in /home which points to /mnt/Windows. In Terminal, run ln -s /mnt/Windows /home/manny (ln = link; -s = symlink). Switch back to File Manager and you should see Windows as a subfolder in your home folder. Double-click to open, then open some file or another. Important: These are your actual files, not copies. Treat with the same care you would if you were editing, deleting, etc. in Windows.

8. Set up Timeshift. Open Timeshift. Will require your password. Go to Settings > Location. Notice you designate your target by its /dev/sdb# identifier. FYI, Timeshift actually keeps track by UUID, but the developer apparently thought folks would find this way easier. I think he was right. While here, you might as well set up a snapshot schedule. With this much room, you can cast a wide net. Two monthly, three weekly and four daily will cover just about any system restore scenario you're likely to run into. For a brief explanation of how Timeshift works, see this post in a prior thread.

Sorry if I overlooked anything. Let me know if something doesn't work as described. FYI, that might look like a lot of work, but it isn't. The whole process probably will take about fifteen minutes. Of course, it's unfamiliar, but everything will fall into place once you're looking at the screens.
Time flies like an arrow. Fruit flies like a banana.
If your problem has been solved, please edit the thread title.

Post Reply

Return to “Installation & Boot”