LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
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
 
LinkBack Search this Thread
Old 07-03-2010, 11:43 PM   #1
JamesGT
Member
 
Registered: Oct 2009
Location: St. Louis, MO, USA
Distribution: Slackware64
Posts: 142

Rep: Reputation: 21
Can an HD be swapped into another PC and booted?


I have Slackware64, v13.1, on my desktop PC, but the video card took a dump so I can't do much with it.

Can I pull out the HD(IDE) and connect it to my laptop and boot via USB to run it? I haven't done much as far as customization goes, just running the huge.s kernal, adjusted the fstab, but that's about it.

It's going to be a week before another video card arrives and I'd like to be able to get to my files and setup.

thanks!

JamesGT
 
Old 07-03-2010, 11:56 PM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,420

Rep: Reputation: 448Reputation: 448Reputation: 448Reputation: 448Reputation: 448
Yeah probably. If nothing else you can hook it up and boot from live CD.
 
Old 07-04-2010, 12:05 AM   #3
hedron
Member
 
Registered: Jul 2009
Location: NYC
Distribution: Slackware, Bluewhite
Posts: 180

Rep: Reputation: 19
I tried this once, all you have to do is edit xorg.conf to set a different video card and maybe some other file you changed specifically for your hardware.
 
Old 07-04-2010, 12:08 AM   #4
Telengard
Member
 
Registered: Apr 2007
Location: USA
Distribution: Kubuntu 8.04
Posts: 579
Blog Entries: 8

Rep: Reputation: 146Reputation: 146
Yes and no. As long as your laptop is capable of booting from USB (my older laptop is not) then you can theoretically boot from the HD from the desktop. The problem most likely to occur is differences in hardware will mean that some things won't work.
 
Old 07-04-2010, 12:33 AM   #5
JamesGT
Member
 
Registered: Oct 2009
Location: St. Louis, MO, USA
Distribution: Slackware64
Posts: 142

Original Poster
Rep: Reputation: 21
well, it looks half encouraging I'll give it a go tomorrow.
 
Old 07-04-2010, 01:26 AM   #6
bgeddy
Senior Member
 
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810

Rep: Reputation: 221Reputation: 221Reputation: 221
I've just done this taking my USB attached disk to my Brother's house and booting his system from it when I stayed (I didn't want to use his Windows). Here's the things to watch.

You may well find that to use the root="LABEL=" in lilo.conf you will need to use the generic kernel with an initial ram disk as this handles this option. I changed my lilo.conf to use this form of the root= line
Code:
root="LABEL=root"
after applying the required labels to my partitions. I also changed to this in /etc/fstab
Code:
LABEL=root       /                ext3        defaults         1   1
LABEL=swap      swap              swap       defaults          0  0
LABEL=home       /home            ext3        defaults         1   2
to handle mounting the partitions should the device change across systems. I have this in lilo to handle USB booting
Code:
append="rootdelay=10 vt.default_utf8=0"
I also moved /etc/X11/xorg.conf to a save file as my xorg uses nvidia and his doesn't. I also saved and edited /etc/rc.d/rc.inet1.conf as his network was detected differently and setup a little different from mine.

As fas as I remember that was it - it just worked and I was pleasantly surprised how easy it was as his hardware is totally different from my usual.
 
Old 07-04-2010, 04:52 AM   #7
AGer
Member
 
Registered: Oct 2007
Distribution: Slackware current
Posts: 136
Blog Entries: 22

Rep: Reputation: 19
Do not forget to "pay particular attention to 70-persistent-net.rules and 70-persistent-cd.rules" as CHANGES_AND_HINTS suggests.
 
Old 07-04-2010, 05:32 AM   #8
Reasa
Member
 
Registered: Aug 2008
Distribution: Slackware
Posts: 51

Rep: Reputation: 15
Yes, i did that, just be sure you boot the default, stock kernel, it will boot on anything. From there you can set it up as usual.
 
Old 07-04-2010, 07:17 PM   #9
JamesGT
Member
 
Registered: Oct 2009
Location: St. Louis, MO, USA
Distribution: Slackware64
Posts: 142

Original Poster
Rep: Reputation: 21
Well, it booted, but when it comes time to mount the root drive, it fails and halts. It gives me three choices to enter when I boot and I can enter root=/dev/sda1, root=/dev/sda2 and root=/sda/sr0. These are the drives in the laptop, but it doesn't tell me what drive the USB drive is. Is there a way to tell? Once I have that, I believe I can boot easily.

Right now I'm running of a liveCD of eLive to access my data, but I'd rather just boot into Slackware and have all my tools and software.
 
Old 07-04-2010, 07:37 PM   #10
bgeddy
Senior Member
 
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810

Rep: Reputation: 221Reputation: 221Reputation: 221
Please check my original post. You don't need to worry about device naming when using labels - it's the easiest way.
 
Old 07-04-2010, 08:30 PM   #11
Richard Cranium
Member
 
Registered: Apr 2009
Location: Carrollton, Texas
Distribution: Slackware
Posts: 686

Rep: Reputation: 149Reputation: 149
Quote:
Originally Posted by bgeddy View Post
Please check my original post. You don't need to worry about device naming when using labels - it's the easiest way.
Or if you used grub instead of lilo, you could change the root device on the fly.

Honestly, grub beats the cr*p out of lilo.
 
Old 07-04-2010, 09:03 PM   #12
dc_eros
Member
 
Registered: Nov 2006
Distribution: Slackware, Cygwin
Posts: 208

Rep: Reputation: 23
Maybe you can default to runlevel 3 just to be safe
 
Old 07-04-2010, 11:49 PM   #13
JamesGT
Member
 
Registered: Oct 2009
Location: St. Louis, MO, USA
Distribution: Slackware64
Posts: 142

Original Poster
Rep: Reputation: 21
Quote:
Originally Posted by bgeddy View Post
Please check my original post. You don't need to worry about device naming when using labels - it's the easiest way.
I tried doing it with labels but maybe I did't follow your instructions.

Here is what I did...

In lilo config I fount the "root=" line and changed it to...

root="LABEL=root"

Code:
# Linux bootable partition config begins
image = /boot/vmlinuz
#  root = /dev/sdb1
  root = "LABEL=root"
  label = Slackware
  read-only  # Partitions should be mounted read-only for checking
# Linux bootable partition config ends
Then I updated my fstab as follows...

Code:
/dev/sdb4        /data            ntfs-3g     umask=000        1   0
#/dev/sdb3        swap             swap        defaults         0   0
LABEL=swap        swap             swap        defaults         0   0
/dev/sdb2        /eLive           auto        users            1   0
#/dev/sdb1        /                ext4        defaults         1   1
LABEL=root        /                ext4        defaults         1   1
/dev/sda1        /500gb           ntfs-3g     umask=000        1   0
#/dev/cdrom      /mnt/cdrom       auto        noauto,owner,ro  0   0
/dev/hdc         /toshiba         auto        defaults         1   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       defaults         0   0
I am using the huge.s kernal as it comes with Slackware 13.1.
 
Old 07-05-2010, 12:45 AM   #14
bgeddy
Senior Member
 
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810

Rep: Reputation: 221Reputation: 221Reputation: 221
To use the LABEL functions you'll need to run the generic kernel and also need the appropriate devices, (something like ehci-hcd,usb-storage,ext4 and associated), in the initial ram disk. You first need to have applied those labels to the partitions with mkswap for the swap and e2label for the ext4. You also need the wait setting for allow the kernel load to wait for the usb to spin up. This can be found by looking at man mkinitrd.

I appreciate all this may sound a bit much. It may well be easier at this stage to boot up with the slackware install disks and see what devices are being detected by running "fdisk -l" as root. You can then chroot -bind the /proc and /dev devices and then chroot to the slackware root partition on the usb drive. You then need to create the initial ram disk with the appropriate mkintrd command and apply the labels to the partitions with mkswap -L and e2label. Then you need a lilo stanza for the generic kernel and initial ram disk.

The alternative is to do all the above to see what the usb disk is being detected as and try booting to the huge kernel using a set device as the root device in lilo and fstab i.e use this as the root device and bot to the huge kernel. You'll still need a rootdelay in lilo.conf to allow the usb drive to spin up. The huge kernel won't work with LABEL settings though.

Yes you'll need to do a bit of research but you should be able to get this all working reasonably easily.
 
Old 07-05-2010, 05:15 AM   #15
zordrak
Member
 
Registered: Feb 2008
Distribution: Slackware
Posts: 550

Rep: Reputation: 109Reputation: 109
Migrating Slackware to New Hardware
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
cd and dvd drives swapped!?!? bobsthename Mandriva 4 06-29-2006 01:22 PM
Swapped memory with 1GB? gmontag79 Red Hat 0 02-09-2005 01:33 PM
Swapped monitor - no video now... rleeanthony Fedora 2 06-11-2004 06:08 PM
Swapped out memory size srinivasar Linux - General 2 09-23-2003 05:09 PM
Swapped out memory size srinivasar Linux - General 0 09-23-2003 02:39 AM


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

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration