LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 01-11-2009, 07:53 PM   #1
shukuboy
LQ Newbie
 
Registered: Jan 2009
Posts: 3

Rep: Reputation: 0
Moving primary(boot) partition to another HDD


Hi Everyone,

I have an eee PC mico laptop with Xandros Linux on it. The laptop and Xandros are both great, only issue I've been experiencing is that the kernel partition filled up way too quickly, as I only have a total of 20 GB between the two solid state hard drives on my laptop. The allocated partition to kernel is only 3.5 Gigs.

Xandros kernel has two partitions, one is the one named System which is an ext2 and the other one which is smaller and I think acts as as SWAP partition, which is an ext3.

I've used PartedMagic to boot up the laptop from USB and copied both of the kernel partitions to the second hdd and increased their size.

First hard drive still contains the BIOS partition, the original two kernel partitions, and another one of type EFI which is only 7.84 MB . The next step would be to get rid of the kernel partitions on the first hdd and boot from the second one.

Is it safe to delete the kernel partitions on the first hdd and change the boot media in BIOS setup to the second hdd ? Do I need to copy BIOS and the other partition to the second hard drive as well ? Anything else I need to do to get my laptop booting happily from the second hdd ?


Thanks,
Shukuboy
 
Old 01-11-2009, 08:32 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,336

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
Quote:
Originally Posted by shukuboy View Post

Xandros kernel has two partitions, one is the one named System which is an ext2 and the other one which is smaller and I think acts as as SWAP partition, which is an ext3.

A swap partition is never a file system. So either this partion is not swap or it is not an ext3 file system. If it is really a swap partition then don't copy it. Just format the new swap partition with the mkswap command. See:

man mkswap


Quote:
Originally Posted by shukuboy View Post


Is it safe to delete the kernel partitions on the first hdd and change the boot media in BIOS setup to the second hdd ?

I suggest that you do this in the reverse order. Make sure that booting to the second HDD works. You can add an entry to the /boot/grub/menu.lst on your first drive to boot into the kernel on your second drive for testing purposes.

You will have to edit /boot/grub/menu.lst on the second drive to make it correspond to the new drive configuration. Then boot into the second drive and use grub-install to install the new version of grub on the MBR. Make sure that you are using the /boot/grub/menu.lst file on the second drive before you delete /boot/grub/menu.lst on the first HDD. Otherwise your grub bootloader will stop working when you delete the kernel partitions on the first drive.

Also edit the file /etc/fstab on your second drive to make sure that fstab points to the partitions on the second drive, not the first.

Once you have your second drive /boot/grub/menu.lst, grub-install, and /etc/fstab set up and working then you can delete the kernel partitions on the first drive.


Quote:
Originally Posted by shukuboy View Post


Do I need to copy BIOS and the other partition to the second hard drive as well ?
I don't know what the BIOS partition is. If the other partition is swap then format it as described above. If the other partition is something other than swap then yes, it should be copied.



Quote:
Originally Posted by shukuboy View Post


Anything else I need to do to get my laptop booting happily from the second hdd ?

You will have to change fstab on the second drive as described above. Also once you get menu.lst set up correctly on the second drive then you will have to boot into the second drive and use grub-install to put a new copy of grub on the MBR of the second drive.

---------------------
Steve Stites
 
Old 01-14-2009, 10:03 AM   #3
shukuboy
LQ Newbie
 
Registered: Jan 2009
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks very much Steve for the comprehensive and in-detail reply. This has been quite helpful.

One thing I'm still struggling with right now is the changes I've made to menu.lst aren't detected by grub. I've removed hiddenmenu option and updated the timeout to 10seconds but still don't see the grub menu.

Any ideas ?

Cheers,
Shukuboy.
 
Old 01-14-2009, 11:05 AM   #4
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,336

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
Does the grub on the MBR point to the same menu.lst that you are editing? If not then use the grub-install command to reinstall grub on the MBR.

Or you could make the changes in the menu.lst that the MBR is currently pointing to.

-------------------
Steve Stites
 
  


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
[RAID1, GRUB] Secondary HDD can't boot up when primary HDD fails Akhran Linux - Newbie 2 05-04-2006 04:17 AM
Moving root from a dual-boot HDD to a new HDD Androoski SUSE / openSUSE 1 05-13-2005 10:34 PM
Should I create a 1GB PRIMARY Partition for /boot bluedevlx Linux - Newbie 10 11-20-2004 05:36 PM
Moving from extended partition to primary partition joelbudgor Linux - General 5 05-26-2004 06:08 PM
Can't remove 2ndry hdd w/Mandrake, primary with W2k won't boot! Ariel Starfire Linux - Newbie 1 05-14-2004 04:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

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