Copying a Linux distro from one partition to the other...


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Copying a Linux distro from one partition to the other...
# 1  
Old 06-17-2003
Copying a Linux distro from one partition to the other...

Hola. Here is how my partition table looks:

Device Boot Start End Blocks Id System
/dev/hde1 1 1689 13566861 7 HPFS/NTFS
/dev/hde2 * 1690 2783 8787555 83 Linux
/dev/hde3 2784 2813 240975 82 Linux swap
/dev/hde4 2814 4111 10426185 5 Extended
/dev/hde5 2814 4065 10056658+ 83 Linux
/dev/hde6 4066 4111 369463+ 82 Linux swap

I have Debian on hde2 and LFS on hde5. I haven't used Debian for a long, long time now (I only needed it to build LFS), so I want to format hde2 and then copy my LFS partition onto it. Is this safe to do?

If yes, then will a simple `cp / /mnt/debian` suffice?

Last edited by Mr_Proper; 06-17-2003 at 11:51 AM..
# 2  
Old 06-17-2003
As long as your bootloader is on the MBR, then cp -r should do the trick. Remember to redo your config files!
# 3  
Old 06-17-2003
Yes, most importantly /etc/fstab, bootloader config and root= for the kernel.

You could test it works before fully changing by doing 'chroot /dev/hd[whatever debian was]' and if it doesn't work tweak the config's until it does.
# 4  
Old 06-17-2003
Cool..

Cool, thanks for the info, guys. I was worried that certain software may have specific harddrive locations embedded in them, but maybe that is just one of the annoying quirks of Windows.

Quote:
As long as your bootloader is on the MBR, then cp -r should do the trick. Remember to redo your config files!
The bootloader is on the Debian partition (hde2). Windows doesn't want to put its bootloader anywhere else except the MBR, so I had to do it that way. I'm going to do what Tux said and chroot to do all the lilo stuff. Hopefully that works. Thanks again, guys. Smilie
# 5  
Old 06-18-2003
i would use cp -rp to preserve the rights on the files when you copy!
# 6  
Old 06-18-2003
Install GRUB to the MBR and teach it to boot Windows.

I run RH9 and WinXP.... works for me. Don't be afraid to kill the windows bootloder.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Open Source

What is your favorite Linux distro?

What is your favorite Linux distro? and possibly why? Personally, I have Fedora 3 on my computer. I have used Ubuntu and Slackware, too. But I think I liked Ubuntu more, maybe because of its speed and easy installation of packages. (192 Replies)
Discussion started by: milhan
192 Replies

2. Red Hat

Shrink LVM partition & create new Linux Primary partition

Hello All, I have a Red Hat Linux 5.9 Server installed with one hard disk & 2 Partitions created on it as follows, /boot - Linux Partition & another is LVM - One VG & under that 5-6 Logical volumes(var,opt,home etc). Here my requirement is to take out 1GB of space from LVM ( Any logical... (5 Replies)
Discussion started by: gr8_usk
5 Replies

3. Linux

Best Linux Distro

Hello, I have a Compaq Presario v3000 5 year old laptop, with 1 GB RAM and currently running the (slow and stupid) Windows 7 32 bit, thus I would like to dual boot it with an appropriate distro of Linux that 1) Doesnt consume too much resources (1 GB RAM is not a lot of space) and it ll be... (4 Replies)
Discussion started by: ajayram
4 Replies

4. Linux

Best Linux desktop distro

I hate the fact that my first post is this. Anyhow, I've been using Linux distros such as Ubuntu, Fedora, Debian, openSUSE, and a few others for quite some time now. I've never had a problem with any distro, thus saying that they were all good in my opinion. I've been reading a lot on different... (2 Replies)
Discussion started by: Vex
2 Replies

5. What is on Your Mind?

Creating a Linux Distro

I have been using Linux OS since 4 years and I'm very interested to know how to create a Linux Distro. I have heard about LFS. I would just like to know, what do I need to create a Linux Distro? I'm not a programmer, if I have to create a Linux Distro, what programming languages do I need to... (3 Replies)
Discussion started by: Auzern
3 Replies

6. UNIX for Dummies Questions & Answers

New to linux. Which distro should i use?

want to know which Linux distro is 4 me. want 2 teach my self programing and problem solving. i want to learn code and write code. i have an acer aspire one 2GB memory 160 GB HDD intel Atom. look im as noobie as it gets im a MS xp, vista boy want to go beyond graphical click and do... any help... (1 Reply)
Discussion started by: BizilStank
1 Replies

7. Shell Programming and Scripting

Linux distro from bash script

hello ALL, I wander, is there an easy way to get information which linux distro and its version a script runs on? I'm looking for a function like getDistroInfo(), which would return strings like "Ubuntu7.10" or "SLES10" or "RHEL5" etc. uname returns lots of stuff, but distro info.... (1 Reply)
Discussion started by: Samtim74
1 Replies

8. Solaris

copying/moving partition

I have a slice on a 72GB hard drive like this (example): /dev/dsk/c0t1d0s0 51424287 51009 50859036 1% /usr/stuff that I need to copy or move to a slice on a MUCH larger slice like this: /dev/dsk/c0t2d0s6 70592505 570236 69316344 1% /usr/newstuff What is the... (4 Replies)
Discussion started by: antalexi
4 Replies

9. UNIX for Dummies Questions & Answers

Linux distro

Hi I'm have old toshiba laptop(t1900) 486, 4mbRAM and ~120MB of hdd I'm looking for distro to suite my comp, no need for X windows but not enything that runs on FAT, just normal small Linux. Actually, *BSDs will do as well. If u know any distro that would do this I will be thankful for hint ... (4 Replies)
Discussion started by: wolk
4 Replies
Login or Register to Ask a Question