LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 08-05-2006, 02:09 PM   #1
shubb
Member
 
Registered: Oct 2003
Location: San Francisco
Distribution: Slackware 13.37
Posts: 150

Rep: Reputation: 16
Moving a Slack install from an ATA disk to a RAID array


I'm trying to move a current working installation of Slackware 10.2 from a pata drive to a sata RAID 5 array.

I'm using the HighPoint Technologies RocketRaid 2300 card. I've compiled in the raid card drivers into the kernel, so when I boot from the pata drive I can see the sata array. I've dd'ed the contents of each of the partitions to the corresponding partitions on the array.

I changed the lilo.conf file on the raid array to say:
Code:
boot = /dev/sda

(middle stuff...)

image = /boot/vmlinuz-smp-hp2300
  root = /dev/sda6
  label = Linux_smp_raid
  read-only
I've made the /boot partition bootable in fdisk.
Code:
root@VMserver:/mnt/hd/etc# fdisk -l /dev/sda

Disk /dev/sda: 749.9 GB, 749941555200 bytes
255 heads, 63 sectors/track, 91175 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      104391   83  Linux
/dev/sda2              14         257     1959930   82  Linux swap
/dev/sda3             258       91175   730298835    5  Extended
/dev/sda5             258         501     1959898+  83  Linux
/dev/sda6             502        5365    39070048+  83  Linux
/dev/sda7            5366       41839   292977373+  83  Linux
When I lilo, I use the config on the raid array, and I install it into the MBR.
Code:
root@VMserver:/mnt/hd/etc# lilo -C /mnt/hd/etc/lilo.conf -M /dev/sda
/boot/boot.0800 exists - no /dev/sda backup copy made.
The Master Boot Record of  /dev/sda  has been updated.
When I look at the boot order of the BIOS I see the first boot drive is the SCSI RocketRaid controller.

Now when I reboot without the pata drive installed, I get the error:

No boot signature in partition

What am I missing?
 
Old 08-06-2006, 04:56 AM   #2
Slim Backwater
Member
 
Registered: Nov 2005
Distribution: Slackware 10.2 2.6.20
Posts: 68

Rep: Reputation: 15
My guess is that message is coming from your BIOS, meaning that it isn't finding a MBR on the RAID drive. Are there any settings in the RAID Controller's BIOS that might be preventing booting?

Maybe try
Code:
lilo -v -r /mnt/hd
The -v will tell you more about what LILO is doing.

Also try adding your image= section to the PATA drive's lilo.conf, run a regular `lilo` and then use that to bootstrap to the RAID. Once running on the RAID, run lilo there to update the RAID MBR, and THEN remove the PATA drive.

Getting your kernel onto any other boot device (USB or CD-ROM) might help and is good to have for recovery.

Wait, you `dd` the contents? Will that work? I don't think it will work unless the partitions are exactly identical, I mean down to the sector count (superblocks might end up in the wrong offset for the size of the partition). Try again with rsync -av which is how I've done this before.

Also, after you get your boot problems resolved, consider using LVM for your other partitions (other than /boot and /root) here's a How-I-Do-It:
/dev/sda1 about 128Meg, ext2 mounted on /boot
/dev/sda2 about 2x RAM, swapfs mounted as swap
/dev/sda3 about 5GB, ReiserFS mounted on root (/)
/dev/sda4 Remainer of Drive, LVM PV and then create a volume group with that. Then create logical volumes that can be easily resized on the fly. The volumes I create wouldn't consume all the free space; the plan is to grow the volumes that need it, only when the need it)

Code:
pvcreate /dev/sda4
vgcreate main /dev/sda4
lvcreate -L 4G -n usr main
mkreiserfs /dev/main/usr
Need more space on the resultant usr logical volume?
Code:
lvextend -L +1G /dev/main/usr
resize_reiserfs /dev/main/usr
which can be done on the fly. (And I have done a couple of times, on my primary production system runing an Oracle Database with 100+ users connected)

ReiserFS is a good choice because it is possible to shrink the partition, but you have to umount it first. JFS and XFS can't be shrunk, they have to be recreated to a smaller size.

Hope something in there helps.

._.
 
Old 08-06-2006, 11:54 AM   #3
shubb
Member
 
Registered: Oct 2003
Location: San Francisco
Distribution: Slackware 13.37
Posts: 150

Original Poster
Rep: Reputation: 16
Excellent! That worked for me! I used your suggestion about changing the image directory on the pata drive, and was able to boot off the RAID. Once there, I re-ran lilo and I got some more info that I never got before.
Code:
root@VMserver:~# lilo -v    
LILO version 22.5.9, Copyright (C) 1992-1998 Werner Almesberger
Development beyond version 21 Copyright (C) 1999-2004 John Coffman
Released 08-Apr-2004 and compiled at 00:18:50 on May 21 2004.

Warning: LBA32 addressing assumed
Reading boot sector from /dev/sda
Warning: /dev/sda is not on the first disk
Using MENU secondary loader
Calling map_insert_data
Mapping message file /boot/boot_message.txt
Calling map_insert_file

Boot image: /boot/vmlinuz-smp-hp2300
Added Linux_smp_raid *

Writing boot sector.
Backup copy of boot sector in /boot/boot.0800
Thanks! I think you're right about dd not being the best way to copy. The command works, and I can boot it, but I lost some space on the raid array. I made a 20G root on the pata drive, and a 40G on the sata array. After the dd, I only see 20G mounted and available. Do I have to re-fdisk and start over to get the space back?

The reason I used dd was because the /dev files are not regular files, and I think if you do a copy, they do not get created the correct way. Does rsync copy the /dev/ files correctly?
Code:
root@VMserver:~# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda6              18G  2.0G   16G  12% /
/dev/sda1             102M   43M   60M  42% /boot
/dev/sda5             1.9G  701M  1.2G  37% /tmp
/dev/sda7             280G  2.1G  278G   1% /home
root@VMserver:~# fdisk -l /dev/sda

Disk /dev/sda: 749.9 GB, 749941555200 bytes
255 heads, 63 sectors/track, 91175 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      104391   83  Linux
/dev/sda2              14         257     1959930   82  Linux swap
/dev/sda3             258       91175   730298835    5  Extended
/dev/sda5             258         501     1959898+  83  Linux
/dev/sda6             502        5365    39070048+  83  Linux
/dev/sda7            5366       41839   292977373+  83  Linux
Now about the LVM.

So if I understand you right, you create the /boot, / and swap using fdisk, and leave the rest as unpartitioned.
Then in the linux OS, you use LVM to create the additional partitions.
So if you wanted to have more than one extendable partitions, you re-do the third command (lvcreate) but use a different directory, like home for example?
Then to mount them into linux, you "mount /dev/main/usr /usr"?

Last edited by shubb; 08-06-2006 at 11:58 AM.
 
  


Reply



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
Installing Slack 10.1 onto 3ware RAID 5 Array tobyheywood Slackware - Installation 4 05-04-2005 12:41 PM
Installing Suse 9.2 on S-ATA Raid Array EverDeth Linux - Hardware 0 01-24-2005 02:36 PM
ATA RAID with Slack. trouby Slackware 4 01-30-2004 09:45 PM
Kernel 2.4.23 compile causes kernel panics on ATA RAID-1 (mirror) array Raptor Ramjet Slackware 3 12-18-2003 01:40 PM
moving a md array (RAID) MorrisIS Linux - General 2 10-04-2001 11:41 PM

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

All times are GMT -5. The time now is 03:07 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