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

Notices


Reply
  Search this Thread
Old 09-17-2014, 08:11 AM   #1
smwforever45
LQ Newbie
 
Registered: Sep 2014
Location: Germany
Distribution: Zorin OS Core 12.1
Posts: 8

Rep: Reputation: 0
Unhappy Computer won't boot after installing Slackware


This problem has been bothering me for several days and no matter what I do, it just won't change.
I tried installing Slackware 14.1 three times so far (as the secondary OS, the primary OS being Windows 7 x32), the computer always ends up giving me the same error when I try to boot it:
Code:
error: unknown filesystem.
grub rescue>
Funny thing is, if I have the Windows 7 DVD inserted in my CD/DVD tray, Windows will boot just fine and I can work with it. If I have the Slackware DVD inserted, Linux will boot just fine and I can work with it.

What I already tried:
- Creating a separate /boot partition (didn't change anything).
- Setting up LILO instead of GRUB using liloconfig AND lilo, using both simple and expert mode (booted into LILO properly the first time, after that it goes back to GRUB).
- Using the Windows 7 DVD: fixboot and fixmbr to repair the MBR (didn't help, still got me into the GRUB Rescue Mode for whatever reason).

How I installed Slackware:
Using the normal installation procedure. Linux is on the second internal HDD (the first internal HDD is used up entirely by Windows).

For my first and my second try, I partitioned my 320 GB HDD like this:
/dev/sdb1: Swap partition, 2 GB. (I never really understood why I need this - shouldn't 3 GB of RAM be more than enough?)
/dev/sdb2: Root partition, 10 GB, bootable.
/dev/sdb3: /home partition, 308 GB (the entire rest).

For my third try, I tried something different.
/dev/sdb1: Swap partition, 2 GB.
/dev/sdb2: /boot partition, 1 GB. (I read some computers need this and hoped it would work.)
/dev/sdb3: Root partition, 15 GB, bootable.
/dev/sdb4: /home partition, 302 GB (the entire rest).

For my first try, I chose the 'menu' installation routine and removed some components that I felt were unnecessary (for instance, I only installed GRUB and left out LILO).
For my second try, I chose the 'terse' routine, installing everything and also setting up LILO afterwards.
For my third try, I chose 'full' and did not set up LILO.

At the second and third try, I also told the setup program to prepare a USB stick for me to boot from. However, the BIOS won't allow me to boot from it. It gives me the option to boot from a "USB Storage Device", but when I try it, it cancels out with the error message "This is not a bootable disk...", and when I hit any key, it goes to the GRUB Rescue message.

Computer specifications:

Dell Inspiron 1720
320+320 GB Internal HDD
Intel Core 2 Duo T8300 @ 2.40 GHz (2 cores, as the name says)
3 GB RAM (one 2 GB block and one 1 GB block, memtest told me)
nVidia GeForce 8600M GT

Any help would be appreciated.
 
Old 09-17-2014, 01:45 PM   #2
rkfb
Member
 
Registered: Oct 2003
Location: Guildford, England
Distribution: Slackware64 14.2 running TWM
Posts: 474

Rep: Reputation: 136Reputation: 136
Can I just ask? Not saying I have a solution at the moment but where did GRUB come from?

Did you install it yourself after the slackware install or is it maybe left over from a previous dual-boot attempt of another OS?
 
Old 09-17-2014, 02:18 PM   #3
smwforever45
LQ Newbie
 
Registered: Sep 2014
Location: Germany
Distribution: Zorin OS Core 12.1
Posts: 8

Original Poster
Rep: Reputation: 0
I did use Linux Mint before, which was delivered with GRUB (I had no problems whatsoever). However, I formatted the entire Linux HDD and let the Windows 7 disk rewrite the MBR to remove GRUB. Everything was fine.
During the Slackware install, GRUB is installed together with LILO when selecting the "Full" or "Terse" routines during installation. The one thing I did not try so far was to choose the "Menu" routine once again and reinstall Slackware with everything BUT GRUB. However, if that really fixes the problem, then I do wonder why GRUB is installed during the "Full" routine, which is the recommended routine. I'll try it out nevertheless.
 
Old 09-17-2014, 02:43 PM   #4
rkfb
Member
 
Registered: Oct 2003
Location: Guildford, England
Distribution: Slackware64 14.2 running TWM
Posts: 474

Rep: Reputation: 136Reputation: 136
I also have Grub installed on a full install, as you have, but it's never popped up anywhere. I configured LILO when asked and it booted in to that.

This is a Slackware only system though not a dual-boot.
 
Old 09-17-2014, 02:57 PM   #5
rkfb
Member
 
Registered: Oct 2003
Location: Guildford, England
Distribution: Slackware64 14.2 running TWM
Posts: 474

Rep: Reputation: 136Reputation: 136
There's also quite an interesting page on askubuntu:

http://askubuntu.com/questions/14230...own-filesystem

Not saying that's your answer but I have found a lot of stuff in the Ubuntu knowledgebase to be quite useful in the past.
 
Old 09-17-2014, 03:01 PM   #6
smwforever45
LQ Newbie
 
Registered: Sep 2014
Location: Germany
Distribution: Zorin OS Core 12.1
Posts: 8

Original Poster
Rep: Reputation: 0
That is weird, then, because in my case, LILO won't ever pop up, only GRUB will go into Rescue mode because it can't find a known filesystem (even though there's Windows with the NTFS filesystem and Slackware with the Linux filesystem)!

I just now re-installed Slackware WITHOUT GRUB, remade the MBR using the Windows 7 DVD and set up LILO using liloconfig and lilo. Yet still, there seems to be something from GRUB left, because it STILL goes into Rescue Mode when I try to boot.

EDIT: Just now saw the AskUbuntu link. I already tried that too. This is what I get when I type ls and set in Rescue Mode:
Code:
error: unknown filesystem.
grub rescue> ls
(hd0) (hd0,msdos3) (hd0,msdos2) (hd0,msdos1) (hd1) (hd1,msdos5) (hd1,msdos3) (hd1,msdos2) (hd1,msdos1) (hd2) (hd2,msdos1)
grub rescue> set
prefix=(hd0,msdos1)/@/boot/grub
root=hd0,msdos1
grub rescue> ls (hd0,msdos1)
error: unknown filesystem.
I think hd0 is the Linux partition (since prefix and root are set on hd0 and it's three partitions), hd1 is the Windows partition, and hd2 is the USB stick I usually have connected.

Last edited by smwforever45; 09-17-2014 at 03:06 PM.
 
Old 09-17-2014, 03:41 PM   #7
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2.1.2 on Lenovo Thinkpad W520
Posts: 9,485

Rep: Reputation: Disabled
https://bbs.archlinux.org/viewtopic.php?id=119702
 
Old 09-17-2014, 04:09 PM   #8
smwforever45
LQ Newbie
 
Registered: Sep 2014
Location: Germany
Distribution: Zorin OS Core 12.1
Posts: 8

Original Poster
Rep: Reputation: 0
Nope, still same GRUB error message. I did exactly what the post over there said, replacing "/dev/sdx" with "/dev/sda" since /dev/sda is where the MBR is.
 
Old 09-17-2014, 04:40 PM   #9
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=14, FreeBSD_12{.0|.1}
Posts: 5,446
Blog Entries: 11

Rep: Reputation: 3424Reputation: 3424Reputation: 3424Reputation: 3424Reputation: 3424Reputation: 3424Reputation: 3424Reputation: 3424Reputation: 3424Reputation: 3424Reputation: 3424
Quote:
Originally Posted by smwforever45 View Post
Nope, still same GRUB error message. I did exactly what the post over there said, replacing "/dev/sdx" with "/dev/sda" since /dev/sda is where the MBR is.
Which is not possible if you had actually wiped the MBR of the drive that had Grub on it.

Quote:
Originally Posted by smwforever45 View Post
How I installed Slackware:
Using the normal installation procedure. Linux is on the second internal HDD (the first internal HDD is used up entirely by Windows).

For my first and my second try, I partitioned my 320 GB HDD like this:
/dev/sdb1: Swap partition, 2 GB. (I never really understood why I need this - shouldn't 3 GB of RAM be more than enough?)
/dev/sdb2: Root partition, 10 GB, bootable.
/dev/sdb3: /home partition, 308 GB (the entire rest).
I suspect that what is happening is that because you have TWO hard drives, the /dev/sdx designations are being changed in the different contexts.

So when you zeroed the MBR of /dev/sda, you wiped the MBR of the "second" drive - the Linux drive, whereas Grub is installed on the MBR of the other drive and thinks that it is /dev/sda at boot time.

The reason it boots with the CD/DVD in the drive is becauase this causes the drives to be reordered, or selected differently depending on what boot loader you use from the optical disk.

The fix is to refer to the drives by their UUID (/dev/disk-by/uuid) in all contexts, so that when you install Lilo or nuke Grub the destination is unambiguous.

*** EDIT

For a very good overview of how drives are ordered, click here.

Last edited by astrogeek; 09-17-2014 at 04:59 PM.
 
Old 09-17-2014, 06:53 PM   #10
smwforever45
LQ Newbie
 
Registered: Sep 2014
Location: Germany
Distribution: Zorin OS Core 12.1
Posts: 8

Original Poster
Rep: Reputation: 0
Okay, I moved the first 446 bytes of /dev/sdb as well, now the computer is stuck with only a blinking cursor. GRUB is gone, and so is LILO.
I can still boot Windows 7 using the Windows 7 DVD (the only thing that's changed is that the BitLocker message is suddenly all English instead of German as it was before), and I can still boot Linux using the Slackware DVD. But a normal boot attempt ends up with a blinking cursor. Now what do I do to install LILO? If I do liloconfig in Linux (I chose /dev/sdb as the MBR partition this time, instead of /dev/sda as it always suggested), it won't finish installing.

PS: At my first attempt to boot Slackware right after I wiped the MBR of the Linux drive, it gave me the message ""VFS: Insert root floppy and press ENTER", and when I pressed Enter (because I have no freaking floppy tray on my laptop!), it exited out with a Kernel panic.
Surprisingly, it did work at the second and third try without me having changed anything.
 
Old 09-17-2014, 08:10 PM   #11
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=14, FreeBSD_12{.0|.1}
Posts: 5,446
Blog Entries: 11

Rep: Reputation: 3424Reputation: 3424Reputation: 3424Reputation: 3424Reputation: 3424Reputation: 3424Reputation: 3424Reputation: 3424Reputation: 3424Reputation: 3424Reputation: 3424
OK good! We know what is happening and we know how to get it going!

This will likely stretch across several posts (and I am subject to interruption at the moment) so a little patience might be required, but the path to success should be fairly straight forward.

Here is what we need to do from an overview perspective:

1. We need to boot into Slackware however you may, just be sure that you are booted into the installed instance to keep things simpler. We will agree that Slackware is going to be your bootloader manager for the time being - so no sideshows along the way!

2. Once you are booted into the installed Slackware, we need to unambiguously list each drive and partition by its unique ID - NOT by /dev/dsx... path (although you might want to note how those appear under Slackware)! Be very sure of what each actually is so that we don't chase any ghosts (or write to a wrong partition).

So do the following and look for the entries that map to the disks (will show as ... -> /dev/sda, ... -> /dev/sdb) this is how we must refer to them to write the MBRs...

Code:
ls -l /dev/disk/by-id

lrwxrwxrwx ... ata-TOSHIBA_..._X3OAW7RAT -> ../../sda
lrwxrwxrwx ... ata-TOSHIBA_MQ01ABD100_X3OAW7RAT-part1 -> ../../sda1
lrwxrwxrwx ... ata-TOSHIBA_MQ01ABD100_X3OAW7RAT-part10 -> ../../sda10
etc...
Write down enough of the path that you can refer to it unambiguously - you will probably recognize which is your Windows drive and which is your Linux drive unless they are the same make and model.

And we need to know the Windows boot partition and the Linux root partition by UUID (as well as any swap, /home or other partitions that you set up at install...)

Code:
ls -l /dev/disk/by-uuid

lrwxrwxrwx ... 05c94702-210e-482c-ba3f-c3cf26d701ae -> ../../sda10
lrwxrwxrwx ... 8e4545e8-9f29-47c3-8c2e-9d0ab02032f9 -> ../../sda5
lrwxrwxrwx ... 965de7b3-cdfb-4c97-9cac-3b77a718bfcb -> ../../sda6
...

3. Armed with our list of drves and partitions we are going to modify /etc/fstab to use the disk UUIDs instead of device paths. Do this by commenting out the existing lines (do not delete them for now), then make a copy using the UUID, something like this...

Code:
#/dev/sda5        /                ext4        defaults         1   1
UUID=bca4198e...0546e87bb        /                ext4        defaults         1   1
Using your own UUIDs of course!

At this point you should reboot as before (i.e., not from MBR, doesn't yet work) and make sure that the system correctly mounts the partitions by UUID.

Now, with that done, we are going to copy your lilo.conf to maybe lilo_disk1.conf, modify it to use the UUIDs and to install to the MBR where the Grub has been removed. We will almost certainly need to first create a new MBR since it has been zeroed out...

Code:
lilo -M /dev/disk/by-id/... (your primary drive, where Grub was...)
No modify the copy of lilo.conf, replacing /dev/sdxy with the ID/UUID of the appropriate drive or partition.

The boot = .... option will need to be like this (with your ID)
The root = .... option will need to be quoted like below, with the correct UUID

Code:
boot = /dev/disk/by-id/.... (the old Grub disk, would have been /dev/sda probably)

root = "UUID=abce...1234" .... (JUST the UUID, not the /dev/disk/by-uuid/ path)
This assumes that you are booting the huge kernel. If you are using an initrd you will also need to change the root identifier in it.

You might comment out the Windows stanza for now - let's get Slackware booting then we will add Windows back in...

Once you think you have it right, install lilo using the new config...

Code:
lilo -t -C path/to/lilo_disk1.conf (test it)

If no errors...

lilo -C path/to/lilo_disk1.conf
At this point you should have a bootable Slackware... I'll have to continue a little later in another post... see how far you can get, I'll be back!

*** EDIT

Quick note - I did not have you change the image = path in the lilo_disk1.conf, it should not be necessary as long as you are actually booted to the installed partition when you run lilo. If you get a lilo error saying it cant find the image we will need to tweak for that too - but let's not expect trouble!

Last edited by astrogeek; 09-17-2014 at 10:29 PM. Reason: Added image comment, and typos
 
1 members found this post helpful.
Old 09-17-2014, 09:07 PM   #12
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2.1.2 on Lenovo Thinkpad W520
Posts: 9,485

Rep: Reputation: Disabled
In addition, the lsblk command comes handy:
Code:
~$ lsblk -o NAME,TYPE,MODEL,FSTYPE,MOUNTPOINT,UUID,SIZE
NAME   TYPE MODEL            FSTYPE MOUNTPOINT  UUID                                   SIZE
sda    disk HITACHI HTS54321                                                         149,1G
├─sda1 part                  btrfs              805e5830-5cdd-4a4c-8722-4110380c8e4a  17,1G
├─sda2 part                  ext4   /32-current 2107b8e5-d944-43ce-b7f7-d25109d5379d  17,8G
├─sda3 part                  ext4   /           53ea8679-197e-437c-bdcb-61c55c509a2f  92,8G
├─sda4 part                                                                              1K
├─sda5 part                  ext4   /64-14.1    3793727b-e3e6-41ac-a9e5-40c3e1b131de  17,4G
└─sda6 part                  swap               b2ba7b3a-11a0-445b-8da2-edaf0ac316b3     4G
sr0    rom  DVDRAM GSA-U10N                                                           1024M
~$
lsblk -h to know all available columns.
 
1 members found this post helpful.
Old 09-17-2014, 11:23 PM   #13
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=14, FreeBSD_12{.0|.1}
Posts: 5,446
Blog Entries: 11

Rep: Reputation: 3424Reputation: 3424Reputation: 3424Reputation: 3424Reputation: 3424Reputation: 3424Reputation: 3424Reputation: 3424Reputation: 3424Reputation: 3424Reputation: 3424
OK, back for short time. If you have not yet gotten Slackware booting from the first HDD MBR, see post #11 above - suggest that you get that working before continuing with next steps below...

To briefly recap - all we did above was to recreate the MBR on the disk that your BIOS currently thinks is the first hard drive, and install Lilo to the MBR on that drive. We also changed references to the drives and partitions from device paths to unique IDs in both the /etc/fstab and the lilo configuration.

What this does is makes everything downstream of the BIOS bootable drive selection independent of whatever transient and changeable path designations that may be assigned by the kernel... that is, after BIOS hands control to the MBR of its choice, everything else is unambiguously deterministic (until you repartition the drives which will change the UUIDs).

I have hilighted downstream and after in the previous paragraph to emphasize that we are still somewhat at the whim of the BIOS to pick the right drive MBR. What we have done is cheated a little by knowing which drive had Grub on it previously and was being selected by the BIOS, and installed Lilo there. As long as nothing else changes that should be OK - but, if you pull one drive out or add a new one, it will surely fail to boot again because BIOS will pick another one. In some systems you can enter the BIOS and specify the boot drive order so you may want to see if you have that option as well (but please leave it as is for now - remember, no sideshows!).

First, let's add Windows to your now bootable MBR. Boot into Slackware, edit you new lilo_disk1.conf (or whatever you named it), and add the following after the slackware stanza (we can reorder later if you want):

Code:
other = /dev/disk/by-uuid/{uuid of windows bootable partition}
label = Windows
boot-as = 0x80

...then...

lilo -C path/to/lilo_disk1.conf (or whatever you named it...)
Now you can boot into Windows too. If it does not work the first try, use the uuid of any second windows partitoion (I have not booted Windows in years and forget how they arrange them).

So, as things are now you should be booting Windows and Slackware from the "first" drive...

But what we need to do is make the whole setup a little more robust and able to cope with some of the possible things that might change. We do that by installing Lilo in three different places, and providing chain boot options from one to the other. The effect is that if one drive is pulled, the other still has a valid MBR with options to support at least what is installed on itself.

So, without changing the lilo_disk1.conf that we have been using, lets copy it two more times, I'll call them lilo_disk2.conf and lilo_root.conf with the following intent:

Code:
lilo_disk1.conf - The currently bootable MBR lilo installer for the first drive
(I have assumed that the first drive is your Windows drive and the second is your Slackware drive)

lilo_disk2.conf - Will manage the MBR of the second drive
lilo_root.conf - Will manage the boot loader on the Slackware root partition
I always create a /root/lilo/directory when I need to manage multiple lilos and put them there - then copy the first disk MBR (lilo_disk1.conf here) to /etc/lilo.conf so that it is a working lilo conf too.

Now, in the lilo_disk2.conf, we want stanzas to chain boot to the Slackware root partition and to chain boot back to the first drive MBR... the relevant lines being:

Code:
boot = /dev/disk/by-id/{ID of second hard drive}

#Boot Slackware immediately
{Copy slackware stanza from lilo_disk1.conf - nothing changes}

#Go to root partition of this drive
other = /dev/disk/by-uuid/{UUID of Slackware root partition}
label = SlackRoot

#Go to bootloader of first drive
other = /dev/disk/by-id/{ID of first drive MBR, same as "boot = " in lilo_disk1.conf}
label = First_MBR

... then ...

lilo -C path/to/lilo_disk2.conf
Now we still want to install lilo directly to its own root partition - this will allow us to chain boot from any other drive, current or future... Edit lilo_root.conf...

Code:
boot = /dev/disk/by-uuid/{UUID of Slackware root partition}

#Boot Slackware on this partition...
{Copy slackware stanza from lilo_disk1.conf - nothing changes}

#Go to bootloader of second drive
other = /dev/disk/by-id/{ID of second drive MBR, same as "boot = " in lilo_disk2.conf}
label = Second_MBR

#Go to bootloader of first drive
other = /dev/disk/by-id/{ID of first drive MBR, same as "boot = " in lilo_disk1.conf}
label = First_MBR


... then ...

lilo -C path/to/lilo_root.conf
Make sure that all of these work, you should be able to move back and forth between MBRs and root partition (assuming only that you have prompt and timeouts set in each lilo_*.conf).

Once they are all working, you may want to reorder them, the first stanza on the first drive will be the default, and decide whether to prompt or immediately boot - but this will give you a robust and flexible boot system! Just remember that Slackware manages the MBR of both drives! If you install another OS, say another Linux to a new partition or drive, do not let it write the MBR - install to its own root then add an "other" stanza to the appropriate Slackware lilo conf.

If you ever uninstall Slackware, simply transfer the management of the MBRs to whatever OS will be managing it from that point forward! After all, that is the point of this whole exercise - to manage your multi-OS, multi-device boot options!

Good luck - if anything isn't clear or doesn't seem to work (or is incorrect, yikes!) you know where to find me!

Last edited by astrogeek; 09-17-2014 at 11:42 PM.
 
1 members found this post helpful.
Old 09-19-2014, 02:05 PM   #14
smwforever45
LQ Newbie
 
Registered: Sep 2014
Location: Germany
Distribution: Zorin OS Core 12.1
Posts: 8

Original Poster
Rep: Reputation: 0
Thanks a lot for your help so far, I didn't expect such a detailed guide to be honest!
I did a first attempt, followed all your steps, and once again ended up with a blinking cursor... Guess I chose the wrong drive once again. :/ I'll have another try tomorrow since I'm pretty busy today.

Also, I had no idea how exactly I could tell that the partitions are mounted by their UUID's. I had a look at the startup log but found nothing about UUID's.
 
Old 11-06-2014, 12:04 PM   #15
honeybadger
Member
 
Registered: Aug 2007
Location: India
Distribution: Slackware (mainly) and then a lot of others...
Posts: 855

Rep: Reputation: Disabled
I just remembered one time I was installing Slackware and for some odd reasons the kernel named /dev/sda to /dev/hda.
Hope this helps.
 
  


Reply


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
openSuSE 12.1 Microsoft Vista dual boot computer won't boot aristocratic Linux - Newbie 9 12-30-2013 08:18 AM
Computer won't boot live-cd, bios is boot from disc, accidentally emptied partitions. pleasefloss Linux - Newbie 12 01-14-2010 07:20 PM
boot drive changes from hd0 to hd4 to hd1 - computer won't boot Mountain Linux - Hardware 8 03-04-2009 07:30 AM
computer won't boot from cd garyozzy Linux - Hardware 9 09-27-2005 12:42 AM
computer won't boot PlatinumRik Linux - Hardware 7 05-19-2003 11:07 AM

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

All times are GMT -5. The time now is 03:54 PM.

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