On 04/18/2010 12:30 PM, dhk wrote:
> On 04/18/2010 10:37 AM, meino.cra...@gmx.de wrote:
>> dhk <dhk...@optonline.net> [10-04-18 16:20]:
>>> On 04/18/2010 09:58 AM, Grant Edwards wrote:
>>>> On 2010-04-18, Lie Ryan <lie.1...@gmail.com> wrote:
>>>>
>>>>> Yes, you should be able to, installing Gentoo is basically just copying
>>>>> a bunch of files to a partition in a harddisk, nothing magical.
>>>>
>>>> Precisely.
>>>>
>>>>> However, you will have to be able to compile a compatible kernel from
>>>>> your PC. Compatible usually means either your PC have the same
>>>>> architecture as your laptop (which means everything should be already
>>>>> setup) or you have to cross-compile the kernel.
>>>>
>>>> Cross compiling the kernel is fairly trivial, but you need a
>>>> cross-toolchain.  Building one with crosstool-NG isn't too hard, but
>>>> its' not trivial either.
>>>>
>>>>> I've never done kernel cross-compiling, but it's definitely possible,
>>>>> you just need to modify modify some of the Makefile manually (search on
>>>>> google for a howto).
>>>>
>>>> You don't actually need to modify the Makefile if you don't want to.
>>>> You can do it from the command line:
>>>>
>>>>   make ARCH=targetarch CROSS_COMPILE=/path/to/cross/compiler
>>>>
>>>
>>> I'm about to do the same thing.  My current disk is almost full and my
>>> /usr partition isn't big enough, most of the time I can get it down to
>>> 95% but often goes to 100%.  In the next week or two I will move my
>>> system to another drive with lvm or at least a different partition
>>> configuration.  I'll either do a fresh install or a stage4 install.  You
>>> may want to look into that:  a stage4 install.  The documentation is at
>>> http://en.gentoo-wiki.com/wiki/Custom_Stage4 and it looks pretty good
>>> and simple.  This may be the way you want to go.
>>>
>>> dhk
>>>
>>
>> Hi dhk,
>>
>> ...same reasons here: A two small harddisk, a system, which suffers
>> from to less experience as at was initially installed and a person,
>> who wants a fresh one in no time, since time cannot be bought in re-
>> peatedly bigger amounts as with harddisks :)
>>
>> Thank you very much in advance for the hint, dhk!
>> One question: Is it possible to install a new system while starting
>> with an initially empty "world" file, which will be populated then
>> while the configuration/installation process?
>>
>> keep hacking!
>> mcc
>>
>>
> 
> I'm not an expert, but I think it is possible.
> 
> Beware I haven't done this yet, but this is the procedure I'm going to
> try in the the next couple of weeks.
> 
> Do the following in a terminal window from your working system.
>  1) Plug in the new drive.
>  2) Boot your machine as usual to the old Gentoo.
>  3) Run fdisk on the new drive to make partitions you want on your new
> system (fdisk /dev/sdb).
>  4) Make your file systems with mke2fs and mkswap, then run swapon
> /dev/sdb?.
>  5) Make all the mount points for all your partitions, but instead of
> doing it on your new drive do it on your old drive in the /mnt directory
> (mkdir -p /mnt/sdb/boot /mnt/sdb/tmp /mnt/sdb/usr /mnt/sdb/var . . .)
> and make one extra mount point for your old system bin (mkdir -p
> /mnt/sdb/oldsysbin).
>  6) Mount the directories on /dev/sdb from /dev/sda (mount -t ext3
> /dev/sdb7 /mnt/sdb/usr).
>  7) Mount your old system bin for the tar command. My tar is in /bin and
> /bin is on (df -k /bin) /dev/sda3.  Run "mount -t ext3 /dev/sda3
> /mnt/oldsys/" to mount the bin directory.
>  8) Make the stage4.  At the end of the documentation in the link above
> there are scripts that seem to work.  Make sure you change the
> stage4Location in mkstage4.sh to some place with a lot of room.  In this
> example I'd change it to "stage4Location=/mnt/sdb/usr/" remembering the
> trailing slash.  Making it could take a few hours.
>  9) Now the tricky part.  So not to confuse the root partitions (the old
> and new) I would do a chroot.  Run: chroot /mnt/sdb /bin/bash and export
> PS1="(chroot) $PS1" .
>  10) Install the stage4.  Change to the /usr directory and if all is
> correct you should see your stage4 there.  Do a df -k also to make sure
> everything looks right.  Now install the stage4, run: /oldsys/bin/tar
> xvjpf stage4-*.tar.bz2
> 
> When this is done exit chroot and umount everything in /mnt/sdb.  Shut
> down the machine.  If all went well you should now be able to unplug
> either drive and boot to the other.  I would boot to the old drive first
> to make sure that still works as if nothing happened.  Then shutdown,
> unplug the old drive and plug in the new drive.  See if you can boot to
> the new drive.  This should be a mirror image of the old drive with the
> new partition sizes.
> 
> Once again, I haven't tried this yet.  Maybe solicit some other
> opinions.  I don't think it will affect the original system and it
> should allow you to work in another terminal while your building the new
> drive.
> 
> Does this make sense.  Let me know if it works.
> 
> Good luck,
> 
> dhk
> 
> 
> 
> 
> 

correction in #7 "mount -t ext3 /dev/sda3 /mnt/oldsys/" should be "mount
-t ext3 /dev/sda3 /mnt/oldsysbin/"

dhk

Reply via email to