Unix Technical Forum

Switching HDs, preserving "bootability"

This is a discussion on Switching HDs, preserving "bootability" within the Linux Operating System forums, part of the Unix Operating Systems category; --> All, Right now, I have the following configuration on two HDs: /dev/sda3 2316536 1655404 543456 76% / /dev/sda2 600864 ...


Go Back   Unix Technical Forum > Unix Operating Systems > Linux Operating System

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-18-2008, 07:55 PM
Dan
 
Posts: n/a
Default Switching HDs, preserving "bootability"

All,

Right now, I have the following configuration on two HDs:

/dev/sda3 2316536 1655404 543456 76% /
/dev/sda2 600864 111680 458664 20% /boot
none 257608 0 257608 0% /dev/shm
/dev/sda5 101086 7562 88305 8% /home
/dev/hda 4136348 3534320 391908 91% /usr
/dev/sda1 723540 398788 287404 59%
/usr/local/misterhouse

I have a newer, larger SCSI drive. Since it is big enough, I would
like to use just 1 partition (except for SWAP).

1. Are there any performance drawbacks to having 1 partition as opposed
to several (like I currently have)?

2. To do this, is it as simple as mounting the new drive, "cp -R
--preserve=all /* /mnt/new_drive/", changing fstab, removing the old
drive, and reboot? Or is there something else I have to do to make it
"bootable" (I am currently using grub)?

Thanks,
Dan

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-18-2008, 07:56 PM
Hactar
 
Posts: n/a
Default Re: Switching HDs, preserving "bootability"

In article <1162400239.874149.266290@h48g2000cwc.googlegroups .com>,
Dan <dan_hoffard@hailmail.net> wrote:
> Right now, I have the following configuration on two HDs:
>
> /dev/sda3 2316536 1655404 543456 76% /
> /dev/sda2 600864 111680 458664 20% /boot
> none 257608 0 257608 0% /dev/shm
> /dev/sda5 101086 7562 88305 8% /home
> /dev/hda 4136348 3534320 391908 91% /usr
> /dev/sda1 723540 398788 287404 59%
> /usr/local/misterhouse
>
> I have a newer, larger SCSI drive. Since it is big enough, I would
> like to use just 1 partition (except for SWAP).
>
> 1. Are there any performance drawbacks to having 1 partition as opposed
> to several (like I currently have)?


In the "several partitions" case:

File fragments are confined to their own partition, which is a fraction of
the disk, meaning less head movement is necessary to access them.

If something goes wild and logs millions of errors, /tmp doesn't fill up
just because /var does.

If the OS crashes and nukes /dev/hda1, /dev/hda2 is still OK.

> 2. To do this, is it as simple as mounting the new drive, "cp -R
> --preserve=all /* /mnt/new_drive/", changing fstab, removing the old
> drive, and reboot?


I always do

{ cd / ; tar cxf - . ; } | { cd /newdrive ; tar xvf - ; }
^ ^^^^^^^^^

changing the indicated things for each mount point. I think your solution
would copy filesystems like /proc .

> Or is there something else I have to do to make it "bootable" (I am
> currently using grub)?


I haven't used grub (I use lilo), but neither of these do anything WRT
booting. Treat the new drive as if it were, well, new. With lilo I'd
edit /etc/lilo.conf and run /sbin/lilo .

--
-eben QebWenE01R@vTerYizUonI.nOetP http://royalty.no-ip.org:81
ARIES: The look on your face will be priceless when you find that 40lb
watermelon in your colon. Trade toothbrushes with an albino dwarf, then
give a hickey to Meryl Streep. -- Weird Al, _Your Horoscope for Today_
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-18-2008, 07:56 PM
Dan
 
Posts: n/a
Default Re: Switching HDs, preserving "bootability"


Hactar wrote:
> In article <1162400239.874149.266290@h48g2000cwc.googlegroups .com>,
> Dan <dan_hoffard@hailmail.net> wrote:
> > Right now, I have the following configuration on two HDs:
> >
> > /dev/sda3 2316536 1655404 543456 76% /
> > /dev/sda2 600864 111680 458664 20% /boot
> > none 257608 0 257608 0% /dev/shm
> > /dev/sda5 101086 7562 88305 8% /home
> > /dev/hda 4136348 3534320 391908 91% /usr
> > /dev/sda1 723540 398788 287404 59%
> > /usr/local/misterhouse
> >
> > I have a newer, larger SCSI drive. Since it is big enough, I would
> > like to use just 1 partition (except for SWAP).
> >
> > 1. Are there any performance drawbacks to having 1 partition as opposed
> > to several (like I currently have)?

>
> In the "several partitions" case:
>
> File fragments are confined to their own partition, which is a fraction of
> the disk, meaning less head movement is necessary to access them.
>
> If something goes wild and logs millions of errors, /tmp doesn't fill up
> just because /var does.
>
> If the OS crashes and nukes /dev/hda1, /dev/hda2 is still OK.
>
> > 2. To do this, is it as simple as mounting the new drive, "cp -R
> > --preserve=all /* /mnt/new_drive/", changing fstab, removing the old
> > drive, and reboot?

>
> I always do
>
> { cd / ; tar cxf - . ; } | { cd /newdrive ; tar xvf - ; }
> ^ ^^^^^^^^^
>
> changing the indicated things for each mount point. I think your solution
> would copy filesystems like /proc .
>
> > Or is there something else I have to do to make it "bootable" (I am
> > currently using grub)?

>
> I haven't used grub (I use lilo), but neither of these do anything WRT
> booting. Treat the new drive as if it were, well, new. With lilo I'd
> edit /etc/lilo.conf and run /sbin/lilo .
>
> --
> -eben QebWenE01R@vTerYizUonI.nOetP http://royalty.no-ip.org:81
> ARIES: The look on your face will be priceless when you find that 40lb
> watermelon in your colon. Trade toothbrushes with an albino dwarf, then
> give a hickey to Meryl Streep. -- Weird Al, _Your Horoscope for Today_


So if I understand you correctly, just copying the files from one drive
to another is not enough.. I still have to have grub configure the new
drive.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 01-18-2008, 07:56 PM
Hactar
 
Posts: n/a
Default Re: Switching HDs, preserving "bootability"

In article <1162417652.387388.195300@e3g2000cwe.googlegroups. com>,
Dan <dan_hoffard@hailmail.net> wrote:
>
> Hactar wrote:
> > In article <1162400239.874149.266290@h48g2000cwc.googlegroups .com>,
> > Dan <dan_hoffard@hailmail.net> wrote:
> >
> > > Or is there something else I have to do to make it "bootable" (I am
> > > currently using grub)?

> >
> > I haven't used grub (I use lilo), but neither of these do anything WRT
> > booting. Treat the new drive as if it were, well, new. With lilo I'd
> > edit /etc/lilo.conf and run /sbin/lilo .

>
> So if I understand you correctly, just copying the files from one drive
> to another is not enough.. I still have to have grub configure the new
> drive.


Correct. Unless grub does some magic, the nature of which is unfamiliar
to me, just copying the files would leave the boot sector unchanged.

--
-eben QebWenE01R@vTerYizUonI.nOetP royalty.no-ip.org:81

And we never failed to fail / It was the easiest thing to do -- CSN

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 01-18-2008, 07:56 PM
Moe Trin
 
Posts: n/a
Default Re: Switching HDs, preserving "bootability"

On 1 Nov 2006, in the Usenet newsgroup comp.os.linux.setup, in article
<1162400239.874149.266290@h48g2000cwc.googlegroups .com>, Dan wrote:

>Right now, I have the following configuration on two HDs:


OK

>I have a newer, larger SCSI drive. Since it is big enough, I would
>like to use just 1 partition (except for SWAP).
>
>1. Are there any performance drawbacks to having 1 partition as opposed
>to several (like I currently have)?


In theory, there is a performance hit by having separate partitions
because everything can be dumped around one physical range of cylinders
on a single partition, while the heads would have further to travel to
reach the partition that has what you are reading/writing to. How
important this might be depends solely on your system usage, and what
you've got stashed on the disk.

There is major benefit to having /home on a separate partition. Most
people never back up (or even have the capability to back up) their disks
and when they install a new distribution - /home is toast if it's on the
same partition as the rest of the stuff. Here are two mini-howtos that
should be on your system that discuss this and other concepts. The first
is a bit dated.

-rw-rw-r-- 1 gferg ldp 39240 May 3 2001 Install-Strategies
-rw-rw-r-- 1 gferg ldp 68659 Jan 4 2006 Partition

>2. To do this, is it as simple as mounting the new drive, "cp -R
>--preserve=all /* /mnt/new_drive/", changing fstab, removing the old
>drive, and reboot? Or is there something else I have to do to make it
>"bootable" (I am currently using grub)?


-rw-rw-r-- 1 gferg ldp 23639 Aug 21 2000 Hard-Disk-Upgrade

Like Hector, I'm not using GRUB, but that's also got to be changed to
point to the new locations, etc. FREE CLUE: Make sure you have a
rescue capability - either a bootable CD (such as the rescue CD that
comes with some distributions) or bootable floppy. "Bad stuff happens."

Old guy
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 06:29 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com