Slackware This Forum is for the discussion of Slackware Linux.
|
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
Due to network maintenance being performed by our provider, LQ will be down starting at 05:01 AM UTC. The exact duration of the downtime isn't currently known. We apologize for the inconvenience.
|
 |
06-24-2010, 12:24 PM
|
#1
|
|
Member
Registered: Oct 2006
Location: Slovak Republic
Distribution: Slackware 13.37, 14.0
Posts: 382
Rep:
|
Cannot boot without my second hard drive
I have two SATA hard drives in my slackware 13.1_64 Desktop.
On 1. Drive I have 3 partitions for Win 7:
/dev/sda1 - Some Win 7 boot partition
/dev/sda2 - Win7
/dev/sda3 - Data partition
On 2. Drive I have 3 partitions for slackware and WinXP:
/dev/sdb1 - Win XP
/dev/sdb2 - Slackware root partition
/dev/sdb3 - Swap
When I disconnect my first drive (Win 7) I cannot boot into slackware. I cannot boot with the Slackware DVD into my root partition too (huge.s root=/dev/sdb2 rdinit= ro).
It gives me single user console but only with read access. I want to remove the Win 7 drive from my Desktop and put into a new (empty) one.
It seems to me that the boot record is on that first drive. How can I make to boot my Desktop with the slackware drive only? This is my lilo.conf:
Quote:
boot = /dev/sda
bitmap = /boot/slack.bmp
bmp-colors = 255,0,255,0,255,0
bmp-table = 60,6,1,16
bmp-timer = 65,27,0,255
append=" vt.default_utf8=0"
prompt
timeout = 50
vga = 773
image = /boot/vmlinuz
root = /dev/sdb2
label = linux
read-only # Partitions should be mounted read-only for checking
other = /dev/sdb1
label = winXP
table = /dev/sdb
other = /dev/sda1
label = win7
table = /dev/sda
|
|
|
|
|
06-24-2010, 12:28 PM
|
#2
|
|
Senior Member
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 1,950
|
if you disconnect your first drive, when booting from the dvd you have to pass /dev/sda2 instead of /dev/sdb2 to lilo, as the remaining drive will be seen as the first
Code:
huge.s root=/dev/sda2
you can check what is seen also booting into the install shell and then issue a
when you have booted fix /etc/fstab, /etc/lilo.conf and reinstall it with
Last edited by ponce; 06-24-2010 at 12:30 PM.
|
|
|
|
06-24-2010, 12:29 PM
|
#3
|
|
Member
Registered: Jan 2010
Location: the universe
Distribution: Slackware (modified), Slackware64 (modified), openSuSE (modified)
Posts: 342
Rep:
|
If you remove your first harddisk (sda), the second harddisk will not be called sdb but sda instead. So try to install lilo on your second harddrive too and eventually add entries for your linux with sdb replaced with sda. Perhaps you will need to modify your /etc/fstab too.
However, it helps a lot, if you post some messages or errors printed on the screen.
|
|
|
|
06-24-2010, 12:31 PM
|
#4
|
|
Member
Registered: Mar 2010
Posts: 56
Rep:
|
When you disconnect sda, sdb becomes sda so you have to modify your lilo.conf and /etc/fstab using slackDVD for example (huge.s root=/dev/sda2).
If you disconnect often sda but never sdb, I suggest you to switch sda and sdb definitively.
|
|
|
|
06-24-2010, 12:43 PM
|
#5
|
|
Member
Registered: Oct 2006
Location: Slovak Republic
Distribution: Slackware 13.37, 14.0
Posts: 382
Original Poster
Rep:
|
Oops. Sorry, that was a mistake. I was booting into sda2 after replacing the drive. I always check it by cfdisk which partition is what. I cannot exactly remember the message it gives - I am going to reboot my Desktop again and read it.
|
|
|
|
06-25-2010, 02:44 AM
|
#6
|
|
Member
Registered: Oct 2006
Location: Slovak Republic
Distribution: Slackware 13.37, 14.0
Posts: 382
Original Poster
Rep:
|
It stops at the point where the system tries to check the root partition with e2fsck. It shows that the e2fsck cannot be found because the partition /dev/sdb2 cannot be accessed.
This happens when I try to boot my root partition with the slackware cd (with one drive). As noted above huge.s root=/dev/sda2 rdinit= ro.
After the e2fsck fails, I get a prompt for system administration. Where it tells I can solve the problem but I cannot even reinstall lilo after login. The partition is mounted read only.
I don't understand why it tries to find /dev/sdb2!?
The only way I can reinstall the lilo (because I cannot boot into my root partition with one drive) is to boot the system with two drives. In this case I need to have the Slackware drive at the second SATA port (/dev/sdb) because if it is reverse it fails to boot too.
I changed the lilo.conf to this:
Quote:
boot = /dev/sda
bitmap = /boot/slack.bmp
bmp-colors = 255,0,255,0,255,0
bmp-table = 60,6,1,16
bmp-timer = 65,27,0,255
append=" vt.default_utf8=0"
prompt
timeout = 50
vga = 773
image = /boot/vmlinuz
root = /dev/sda2
label = linux
read-only # Partitions should be mounted read-only for checking
|
Reinstalled it. With some warnings but no errors so I cannot see any reason why to search for partition /dev/sdb2. (??)
Question: Where lilo installs the booting configuration?? (With one and two drives)
|
|
|
|
06-25-2010, 05:50 AM
|
#7
|
|
Member
Registered: Apr 2009
Location: Oz
Distribution: slackware64-14.0
Posts: 615
Rep: 
|
/etc/fstab needs to be updated as this is what fsck uses to check the file systems.
|
|
|
|
06-25-2010, 08:35 AM
|
#8
|
|
Senior Member
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810
|
I would highly recommend utilizing the LABEL= option in fstab matched with the root="LABEL=" option in lilo.conf. Using this will make your setup flexible and portable. This thread will give you a good idea of how to set this up.
|
|
|
|
06-25-2010, 01:14 PM
|
#9
|
|
Member
Registered: Oct 2006
Location: Slovak Republic
Distribution: Slackware 13.37, 14.0
Posts: 382
Original Poster
Rep:
|
Thanks to everyone. Now it works.
Quote:
|
/etc/fstab needs to be updated as this is what fsck uses to check the file systems.
|
Yes, this was the problem - when I removed the second driver I didn't update my fstab.
As a perfect solution for this was the use of partition LABELS:
Quote:
|
I would highly recommend utilizing the LABEL= option in fstab matched with the root="LABEL=" option in lilo.conf. Using this will make your setup flexible and portable. This thread will give you a good idea of how to set this up.
|
I built an initrd (as in the linked thread was noted) and used LABELS instead of device names. (By the way - do I really need initrd to use LABELS?)
After this when I removed the second drive I was able to boot from DVD. I reinstalled lilo and finally successfully boot with one drive.
|
|
|
|
06-25-2010, 02:35 PM
|
#10
|
|
Senior Member
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810
|
Quote:
|
(By the way - do I really need initrd to use LABELS?)
|
Yes - the initrd includes the init scripts which runs findfs to find which disk volume has the LABEL= set for the root device.
I never noticed this as I have only recently switched to LABEL= in lilo.conf and I always use the generic kernel with an initrd. As an experiment, I tried to boot the huge kernel with a LABEL= and it doesn't work. TSquaredF wisely points this out in the original thread I linked to.
To be honest, reading the lilo.conf man page it looks like this should "just work" but my experience and other mentioned posts show otherwise.
This IBM Linux tip goes into this in some depth.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 08:38 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|