LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Copying root partition from Gentoo Live Disc to hard disk (https://www.linuxquestions.org/questions/linux-newbie-8/copying-root-partition-from-gentoo-live-disc-to-hard-disk-777401/)

gregorian 12-22-2009 03:30 AM

Copying root partition from Gentoo Live Disc to hard disk
 
The Gentoo LiveDVD doesn't come with an installer, but it has everything I need. The disc has image.squashfs, an image of the root file system of the Live Gentoo. I intend to copy this file system onto my hard disk and then install a bootloader so that I can dual boot my system with Windows. I'm not sure how to proceed.

Gentoo LiveUSB provides instructions for installing the disc to a USB drive, but I don't know how to do the same for a hard disk because I'll need to create a swap partition, and also configure the bootloader manually to boot both Gentoo and Windows.

Thank you.

j1alu 12-22-2009 11:16 PM

its debian, but check for a general idea (if you like):
http://forums.debian.net/viewtopic.php?f=16&t=18845

syg00 12-22-2009 11:53 PM

This doesn't sound like a very good idea at all - but I haven't looked at the (gento) liveDVD. Looking to short-cut gentoo is a sure route to disappointment.
Perhaps you should heed the warnings in this article - Neddy (the author) might even pass this way and avail you of the sensible thing to do.

gregorian 12-23-2009 04:25 AM

I wish I read you post earlier syg00, I got a lovely Kernel Panic when I tried to do it on my own. I'd rather install. But I really want to know what's the use of the Live DVD if I can't install from it.

syg00 12-23-2009 04:50 AM

Good question - I don't know why people continue to make GUI installers/CD/DVDs in an attempt to attract new users. Presumably.
Go get the (full) handbook, and a minimal CD, and work your way through it. Very educational.

Agrouf 12-23-2009 05:02 AM

Well, the installer is included. It's just not graphical.
Read this to learn how to install gentoo:
http://www.gentoo.org/doc/en/handbook/
Gentoo is a "Do It Yourself" distro. It doesn't provide a step by step installer. It provides the tools to do whatever you want the way you want. Create your partitions yourself with parted, format them, copy the stage3 file and compile it yourself. It takes longer than installing other binary distros but it allows you to do more things. If yuo don't want to go through that trouble, then install sabayon or use another gentoo derivative.

gregorian 12-23-2009 05:19 AM

I've already installed Gentoo through the minimal discs. I was just frustrated that I waited for 5 days to complete the download of an image that could not be installed. I'm all in for the education part, but I would have never wasted my time with the live disc if I knew that you couldn't install from it. What do I do with the live disc?

AwesomeMachine 12-23-2009 06:55 AM

You just find the root mounted in memory, and do an rsync to the hdd. I've never done it with gentoo live. But I have with Knoppix. There is at least one directory with the root partition. You use ls -al to make sure the root you're using for rsync is not a bunch of symlinks.

So let's say you find the root filesystem in /GENTOO. You mount the hdd in the live cd environment (mount /dev/hda1 /mnt/hda1, and do:

rsync -avH /GENTOO/* /mnt/hda1/. That will copy the cd / to the hdd /. Then you:

chroot /mnt/hda1

and install the bootloader however that distro does it. Gentoo is a great distro. After the boot loader is installed, make a swap file:

dd if=/dev/zero of=/swapfile bs=1M count=2000
mkswap /swapfile

change /etc/fstab to reflect in the chroot environment the lines you will need for the hdd filesystem. Instead of what you copied from the live cd, you'll need fstab to mount / from /dev/hda1, using whatever file system is loaded on the partition. After you edit fstab, update grub. Remove syslinux from the chroot environment. Type 'exit' to exit the chroot. And reboot the machine.

It should boot up from the hdd.

Agrouf 12-23-2009 06:58 AM

You CAN install gentoo from the liveDVD!

gregorian 12-23-2009 07:09 AM

I almost followed the same steps AwesomeMachine, but it didn't work out for me. I guess I made a mistake somewhere, but if you want to try it, I'll warn you that the copying process takes a very large amount of time. That 2.5 GB expands to 8 GB on the root file system you create.

Agrouf, do you have a method for installing the disc without copying the live disc's file system? I read the handbook to install gentoo but I haven't such a method.

Agrouf 12-23-2009 07:26 AM

gregorian: just untar the stage3 file, configure your mirrors and make.conf, select the profile, create the kernel with genkernel, create your fstab, setup your network, configure your init with rc-update, configure grub, add a user and you have a gentoo install.

talalpro 02-15-2010 03:02 AM

If this is the solution whats the use of the DVD???



Even you can't enable persistence mode on the flashdrive!!!

Agrouf 02-15-2010 04:22 AM

The DVD is a host to install Gentoo. You need a host to install Gentoo. That can be any system, but the liveDVD has all the tools needed (compiler, partitioning, compression tools, etc)
It's not as easy as installing Debian or Slackware because it is a source based distro. Installing the distro with binary ready executables is not the point of Gentoo. If you want a binary Gentoo, Sabayon or one of the other binary derivative of Gentoo is the way to go.


All times are GMT -5. The time now is 10:42 PM.