1 |
On 04/18/2010 12:30 PM, dhk wrote: |
2 |
> On 04/18/2010 10:37 AM, meino.cramer@×××.de wrote: |
3 |
>> dhk <dhkuhl@×××××××××.net> [10-04-18 16:20]: |
4 |
>>> On 04/18/2010 09:58 AM, Grant Edwards wrote: |
5 |
>>>> On 2010-04-18, Lie Ryan <lie.1296@×××××.com> wrote: |
6 |
>>>> |
7 |
>>>>> Yes, you should be able to, installing Gentoo is basically just copying |
8 |
>>>>> a bunch of files to a partition in a harddisk, nothing magical. |
9 |
>>>> |
10 |
>>>> Precisely. |
11 |
>>>> |
12 |
>>>>> However, you will have to be able to compile a compatible kernel from |
13 |
>>>>> your PC. Compatible usually means either your PC have the same |
14 |
>>>>> architecture as your laptop (which means everything should be already |
15 |
>>>>> setup) or you have to cross-compile the kernel. |
16 |
>>>> |
17 |
>>>> Cross compiling the kernel is fairly trivial, but you need a |
18 |
>>>> cross-toolchain. Building one with crosstool-NG isn't too hard, but |
19 |
>>>> its' not trivial either. |
20 |
>>>> |
21 |
>>>>> I've never done kernel cross-compiling, but it's definitely possible, |
22 |
>>>>> you just need to modify modify some of the Makefile manually (search on |
23 |
>>>>> google for a howto). |
24 |
>>>> |
25 |
>>>> You don't actually need to modify the Makefile if you don't want to. |
26 |
>>>> You can do it from the command line: |
27 |
>>>> |
28 |
>>>> make ARCH=targetarch CROSS_COMPILE=/path/to/cross/compiler |
29 |
>>>> |
30 |
>>> |
31 |
>>> I'm about to do the same thing. My current disk is almost full and my |
32 |
>>> /usr partition isn't big enough, most of the time I can get it down to |
33 |
>>> 95% but often goes to 100%. In the next week or two I will move my |
34 |
>>> system to another drive with lvm or at least a different partition |
35 |
>>> configuration. I'll either do a fresh install or a stage4 install. You |
36 |
>>> may want to look into that: a stage4 install. The documentation is at |
37 |
>>> http://en.gentoo-wiki.com/wiki/Custom_Stage4 and it looks pretty good |
38 |
>>> and simple. This may be the way you want to go. |
39 |
>>> |
40 |
>>> dhk |
41 |
>>> |
42 |
>> |
43 |
>> Hi dhk, |
44 |
>> |
45 |
>> ...same reasons here: A two small harddisk, a system, which suffers |
46 |
>> from to less experience as at was initially installed and a person, |
47 |
>> who wants a fresh one in no time, since time cannot be bought in re- |
48 |
>> peatedly bigger amounts as with harddisks :) |
49 |
>> |
50 |
>> Thank you very much in advance for the hint, dhk! |
51 |
>> One question: Is it possible to install a new system while starting |
52 |
>> with an initially empty "world" file, which will be populated then |
53 |
>> while the configuration/installation process? |
54 |
>> |
55 |
>> keep hacking! |
56 |
>> mcc |
57 |
>> |
58 |
>> |
59 |
> |
60 |
> I'm not an expert, but I think it is possible. |
61 |
> |
62 |
> Beware I haven't done this yet, but this is the procedure I'm going to |
63 |
> try in the the next couple of weeks. |
64 |
> |
65 |
> Do the following in a terminal window from your working system. |
66 |
> 1) Plug in the new drive. |
67 |
> 2) Boot your machine as usual to the old Gentoo. |
68 |
> 3) Run fdisk on the new drive to make partitions you want on your new |
69 |
> system (fdisk /dev/sdb). |
70 |
> 4) Make your file systems with mke2fs and mkswap, then run swapon |
71 |
> /dev/sdb?. |
72 |
> 5) Make all the mount points for all your partitions, but instead of |
73 |
> doing it on your new drive do it on your old drive in the /mnt directory |
74 |
> (mkdir -p /mnt/sdb/boot /mnt/sdb/tmp /mnt/sdb/usr /mnt/sdb/var . . .) |
75 |
> and make one extra mount point for your old system bin (mkdir -p |
76 |
> /mnt/sdb/oldsysbin). |
77 |
> 6) Mount the directories on /dev/sdb from /dev/sda (mount -t ext3 |
78 |
> /dev/sdb7 /mnt/sdb/usr). |
79 |
> 7) Mount your old system bin for the tar command. My tar is in /bin and |
80 |
> /bin is on (df -k /bin) /dev/sda3. Run "mount -t ext3 /dev/sda3 |
81 |
> /mnt/oldsys/" to mount the bin directory. |
82 |
> 8) Make the stage4. At the end of the documentation in the link above |
83 |
> there are scripts that seem to work. Make sure you change the |
84 |
> stage4Location in mkstage4.sh to some place with a lot of room. In this |
85 |
> example I'd change it to "stage4Location=/mnt/sdb/usr/" remembering the |
86 |
> trailing slash. Making it could take a few hours. |
87 |
> 9) Now the tricky part. So not to confuse the root partitions (the old |
88 |
> and new) I would do a chroot. Run: chroot /mnt/sdb /bin/bash and export |
89 |
> PS1="(chroot) $PS1" . |
90 |
> 10) Install the stage4. Change to the /usr directory and if all is |
91 |
> correct you should see your stage4 there. Do a df -k also to make sure |
92 |
> everything looks right. Now install the stage4, run: /oldsys/bin/tar |
93 |
> xvjpf stage4-*.tar.bz2 |
94 |
> |
95 |
> When this is done exit chroot and umount everything in /mnt/sdb. Shut |
96 |
> down the machine. If all went well you should now be able to unplug |
97 |
> either drive and boot to the other. I would boot to the old drive first |
98 |
> to make sure that still works as if nothing happened. Then shutdown, |
99 |
> unplug the old drive and plug in the new drive. See if you can boot to |
100 |
> the new drive. This should be a mirror image of the old drive with the |
101 |
> new partition sizes. |
102 |
> |
103 |
> Once again, I haven't tried this yet. Maybe solicit some other |
104 |
> opinions. I don't think it will affect the original system and it |
105 |
> should allow you to work in another terminal while your building the new |
106 |
> drive. |
107 |
> |
108 |
> Does this make sense. Let me know if it works. |
109 |
> |
110 |
> Good luck, |
111 |
> |
112 |
> dhk |
113 |
> |
114 |
> |
115 |
> |
116 |
> |
117 |
> |
118 |
|
119 |
correction in #7 "mount -t ext3 /dev/sda3 /mnt/oldsys/" should be "mount |
120 |
-t ext3 /dev/sda3 /mnt/oldsysbin/" |
121 |
|
122 |
dhk |