SlackwareThis 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.
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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:
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
Code:
fdisk -l
when you have booted fix /etc/fstab, /etc/lilo.conf and reinstall it with
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.
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.
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.
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.
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810
Rep:
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.
/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.
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810
Rep:
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.