LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-28-2020, 11:17 PM   #1
deretsigernu
Member
 
Registered: May 2007
Distribution: Slackware 14.1/-current
Posts: 139

Rep: Reputation: 10
Windows 10 upgrade ruins dual boot


I have a laptop with Windows 10 and Slackware64-14.2-current. Windows recently upgraded to a newer build of 10. This did something to my GRUB menu. Now I can't boot Slackware. Where before when I started my computer and waited, I would get a GRUB menu with Slackware 14+ and Windows 10 options. Now, if I don't press F9 at start up, I get

Quote:
Welcome to GRUB!

error: unknown filesystem.
Entering rescue mode...
grub rescue>
I looked up how to respond to the grub rescue and found this. I used the following from the answer on that page:

Code:
grub rescue>set boot=(hd0,gpt6)
grub rescue>set prefix=(hd0,gpt6)/boot/grub
grub rescue>insmod normal
grub rescue>normal
And I get my old GRUB menu. I select Slackware and it starts to boot. But then I get the following:
Quote:

Checking root filesystem:
fsck from util-linux 2.35.1
/sbin/e2fsck: Bad magic number in super-block while trying to open /dev/sda5
/dev/sda5:
The superblock could be 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 usf or something else), the the superblock is corrupt, and you migt try running e2fsck with an alternate suprblock:
e2fsck -b 8193 <device>
or
e2fsck -b 32768 <device>

/dev/sda5 contains a ntfs file system

***
* An error occurred during the root filesystem check.
* You will now be given a chance to log into the system in single-user mode to fix the problem.
*
* If you are using the ext2 filesystem, running 'ef2sck -v -y <partition>' might help.
***

Once you exit the single-user shell, the system will reboot.
I run:

Code:
root@darkstar:/# e2fsck -b 8193 /dev/sda5
Quote:
e2fsck 1.45.5 (07-Jan-2020)
e2fsck: Bad magic number in super-block while trying to open /dev/sda5

The superblock could be 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), the the superblock is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
or
e2fsck -b 32768 <device>

/dev/sda5 contains a ntfs file system
Code:
root@darkstar:/# e2fsck -b 32768 /dev/sda5
Quote:
e2fsck 1.45.5 (07-Jan-2020)
e2fsck: Invalid argument while trying to open /dev/sda5

The superblock could be 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), the the superblock is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
or
e2fsck -b 32768 <device>
So is my Slackware partition really destroyed? I can't fix GRUB2 and get back to it at this point?
 
Old 03-29-2020, 12:44 AM   #2
ferrari
Senior Member
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 4,703

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
What a situation to have encountered! Are you sure about the block size though? I wonder if TestDisk might be worth a shot here.
https://www.cgsecurity.org/wiki/Adva...kup_SuperBlock

Good luck with this.
 
1 members found this post helpful.
Old 03-29-2020, 01:04 AM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 18,995

Rep: Reputation: 3285Reputation: 3285Reputation: 3285Reputation: 3285Reputation: 3285Reputation: 3285Reputation: 3285Reputation: 3285Reputation: 3285Reputation: 3285Reputation: 3285
Strictly speaking, it doesn't look like grub has a problem.
Fire up your rescue system and have a look around.
 
Old 03-29-2020, 06:19 AM   #4
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 14,853

Rep: Reputation: 4880Reputation: 4880Reputation: 4880Reputation: 4880Reputation: 4880Reputation: 4880Reputation: 4880Reputation: 4880Reputation: 4880Reputation: 4880Reputation: 4880
I have made a win10 upgrade last week and it did not destroy anything (like grub or any other partition). So (I would say) this is not related to windows.
But anyway, you need to check the content of that partition as it was suggested.

WARNING! do NOT run e2fsck on an NTFS partition (/dev/sda5), you can only destroy it.
 
Old 03-29-2020, 10:47 AM   #5
deretsigernu
Member
 
Registered: May 2007
Distribution: Slackware 14.1/-current
Posts: 139

Original Poster
Rep: Reputation: 10
@ferrari To answer your question, I am not sure what the block or super block size is. I barely enough know what it is. TestDisk sounds like it might be useful. Thank you for the suggestion.

@sig00 I will try GRUB Super Disk. I have a copy of Knoppix somewhere too. But there is something weird about my laptop that it doesn't like most linux boot options and I can never get past the starting screen. Someone suggested it's just a graphics issue. I have a basic Intel UHD Graphics 620 processor. Maybe that's it. I don't know. I will give those a try, but don't expect much. I installed -current because for some reason, it was the only version that got past the startup screen. I think because it used newer versions of isolinux or one of the other starting procedures. Most of what I just wrote is covered in the long thread at the previous link.

@pan64 Thanks for the reply. This problem started for me right after Windows 10 "upgraded" from build 1809 to build 1909. When I started Windows after that "upgraded", it acted like I had installed Windows anew. I searched web a bit and there was a reference or two in places that said other people had similar experiences. I think those were Ubuntu forums. Not sure. Thank you for the warning about not using e2fsck on ntfs, but I'm pretty sure that I won't hurt that partition. Windows did something to it. Here is my fstab prior to the "upgrade":

Quote:
/dev/sda7 swap swap defaults 0 0
/dev/sda5 / ext4 defaults 1 1
/dev/sda2 /boot/efi vfat defaults 1 0
/dev/sda4 /fat-c ntfs-3g fmask=133,dmask=022 1 0
/dev/sda6 /fat-d ntfs-3g fmask=111,dmask=000 1 0
#/dev/cdrom /mnt/cdrom auto noauto,owner,ro,comment=x-gvfs-show 0 0
/dev/fd0 /mnt/floppy auto noauto,owner 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
proc /proc proc defaults 0 0
tmpfs /dev/shm tmpfs nosuid,nodev,noexec 0 0
/dev/sda5 is my old Slackware /
Or it was. If e2fsck says that partition is NTFS now, when it should have been ext4, it seems that Windows destroyed it first.

Last edited by deretsigernu; 03-29-2020 at 11:17 AM. Reason: gratitude
 
Old 03-29-2020, 10:55 AM   #6
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 14,853

Rep: Reputation: 4880Reputation: 4880Reputation: 4880Reputation: 4880Reputation: 4880Reputation: 4880Reputation: 4880Reputation: 4880Reputation: 4880Reputation: 4880Reputation: 4880
so probably you used that partition earlier for windows and was remembered... That would be anyway a surprise (I mean how can windows take /dev/sda5 and use... ?).
Now you can try to force to set it ext4 again, and try to recover - if you have enough space somewhere to use testdisk.
 
Old 03-29-2020, 12:25 PM   #7
deretsigernu
Member
 
Registered: May 2007
Distribution: Slackware 14.1/-current
Posts: 139

Original Poster
Rep: Reputation: 10
Well, I started the Slackware install again. The first part of the process looks to establish partitions. There are _3_ “Windows recovery environment” partitions now. I don’t know why there are 3. I remember one when I set up dual boot. At least one of those is very recent, as in it was probably added with that upgrade. So it looks like Windows will run rampant over the entire hard disk, not just the local partition it is installed too.
 
Old 03-29-2020, 02:26 PM   #8
ferrari
Senior Member
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 4,703

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
Quote:
@ferrari To answer your question, I am not sure what the block or super block size is. I barely enough know what it is. TestDisk sounds like it might be useful. Thank you for the suggestion.
The TestDisk page that I linked to explains the following regarding the superblock location and block size...
Quote:
The superblock contains all the information about the configuration of the filesystem. The primary copy of the superblock is stored at an offset of 1024 bytes from the start of the partition, and it is essential to mounting the filesystem. Since it is so important, backup copies of the superblock are stored in block groups throughout the filesystem. The first version of ext2 (revision 0) stores a copy at the start of every block group, along with backups of the group descriptor block(s). Because this can consume a considerable amount of space for large filesystems, later revisions can optionally reduce the number of backup copies by only putting backups in specific groups (this is the sparse superblock feature). The groups chosen are 0, 1 and powers of 3, 5 and 7.

Now using the value given by TestDisk, you can use fsck to repair your ext2/ext3 filesystem. I.E. if TestDisk has found a superblock at block number 24577 and a blocksize of 1024 bytes, run

/sbin/fsck.ext3 -b 24577 -B 1024 /dev/hda1
With the information that it provides it may have been possible to then use fsck more successfully (with TestDisk having found the required supverblock location and blocksize).

Last edited by ferrari; 03-29-2020 at 02:27 PM.
 
1 members found this post helpful.
Old 03-29-2020, 05:21 PM   #9
2damncommon
Senior Member
 
Registered: Feb 2003
Location: Calif, USA
Distribution: PCLINUXOS
Posts: 2,916

Rep: Reputation: 103Reputation: 103
Everyone should keep a copy of Super Grub2 around.
 
Old 03-29-2020, 05:39 PM   #10
ferrari
Senior Member
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 4,703

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
Yes, good advice.
 
Old 03-29-2020, 05:50 PM   #11
colorpurple21859
Senior Member
 
Registered: Jan 2008
Location: florida panhandle
Distribution: slackware64-current, fedora,Xubuntu, others
Posts: 4,527

Rep: Reputation: 807Reputation: 807Reputation: 807Reputation: 807Reputation: 807Reputation: 807Reputation: 807
Before the upgrade slackware was on sda5
Quote:
/dev/sda5 / ext4 defaults 1 1
after the upgrade slackware is on sda6
Quote:
set boot=(hd0,gpt6)
Quote:
And I get my old GRUB menu.
Either windows created another partition or re-ordered the partitions.
Edit your fstab for /dev/sda6 or use UUID, reinstall grub, rerun grub-mkconfig, and mkinitrd.

Last edited by colorpurple21859; 03-29-2020 at 05:51 PM.
 
Old 03-30-2020, 01:05 AM   #12
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 14,853

Rep: Reputation: 4880Reputation: 4880Reputation: 4880Reputation: 4880Reputation: 4880Reputation: 4880Reputation: 4880Reputation: 4880Reputation: 4880Reputation: 4880Reputation: 4880
yest, that is possible, windows may create a small "hidden" partition for itself (that is more plausible). In that case better to use uuids to identify partitions.
 
Old 03-30-2020, 10:04 PM   #13
deretsigernu
Member
 
Registered: May 2007
Distribution: Slackware 14.1/-current
Posts: 139

Original Poster
Rep: Reputation: 10
I logged in to Slackware using the “set ... “ and “insmod” commands. I changed to root via su. My fstab now looks like

Quote:
/dev/sda7 swap swap defaults
/dev/sda5 / ext4 defaults
/dec/sda2 /boot/efi vfat defaults
/dev/sda4 /fat-c ntfs-3g fmask=133,dmask=022
/dev/sda6 /fat-d ntfs-3g fmask=111,dmask=000
#/dev/cdrom /mnt/cdrom auto
...
I tried “vi /etc/fstab” and was told there were too many session files in /var/tmp. Went there to see about getting rid of files and I kept getting that the files I was trying to delete were read only.

I am using nano for /etc/fstab and there is a message in red at bottom of field that says “[ File ‘/etc/fstab’ is unwritable ]”

I took a pic of what cfdisk said the hard disk looked like when I was using it with the Slackware install a few minutes ago. That says the /dev/sda6 is now where / resides. /fat-d is on /dev/sda7 and /dev/sda8 holds the linux swap. /fat-d is a ntfs-3g partition that holds data I use on Slackware and Windows. So I was going to write new lines and edit existing lines in fstab to reflect what I saw in cfdisk. But if I can’t get it to save to /etc/fstab, what’s the point? Sorry for sounding sore. I’m open to suggestions, but I’m probably about to just reinstall Slackware. Everything important is backed up.
 
Old 03-30-2020, 10:10 PM   #14
ferrari
Senior Member
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 4,703

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
Quote:
I tried “vi /etc/fstab” and was told there were too many session files in /var/tmp. Went there to see about getting rid of files and I kept getting that the files I was trying to delete were read only.

I am using nano for /etc/fstab and there is a message in red at bottom of field that says “[ File ‘/etc/fstab’ is unwritable ]”
You need root privileges to write to (and remove) system files. For example
Code:
su -c "nano /etc/fstab"
Take care when editing files or in general issuing commands as root.

This may be useful to you...
https://docs.slackware.com/slackware:beginners_guide

Last edited by ferrari; 03-30-2020 at 10:16 PM.
 
Old 03-31-2020, 07:08 AM   #15
onebuck
Moderator
 
Registered: Jan 2005
Location: Summer Midwest USA, Central Illinois, Winter Central Florida
Distribution: SlackwareŽ
Posts: 13,582
Blog Entries: 34

Rep: Reputation: 2774Reputation: 2774Reputation: 2774Reputation: 2774Reputation: 2774Reputation: 2774Reputation: 2774Reputation: 2774Reputation: 2774Reputation: 2774Reputation: 2774
Moderator Response

Moved: This thread is more suitable in <Slackware> and has been moved accordingly to help your thread/question get the exposure it deserves.
 
  


Reply

Tags
e2fsck, grub rescue


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Even in remotest Africa, Windows 10 nagware ruins your day: Update burns satellite link cash LXer Syndicated Linux News 2 06-04-2016 02:20 PM
dropline-installer ruins KDE sythe Slackware 40 08-13-2007 06:27 AM
Opensuse 10.2 ruins reiserfs suguru SUSE / openSUSE 7 05-22-2007 08:24 AM
DVD Burner Ruins Data DVD natewlew Linux - Software 8 03-29-2006 02:29 PM
Logging in as root ruins my sound card configuration Penguin of Wonder Slackware 13 09-26-2005 07:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:51 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration