Thursday, May 2, 2024
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 2850  / 3 Years ago, tue, july 13, 2021, 6:36:27

I am using ubuntu on a virtual machine of disk size of 8 GBs and I was trying to compile kernel to build a module following these steps .



sudo apt-get install build-essential linux-source
cd /usr/src
sudo tar xjvf linux-source-2.6.22.tar.bz2
cd linux-source-2.6.22
sudo cp /boot/config-2.6.22-14-generic .config
sudo make
sudo make modules


but it crashed due to lack of space so I added another virtual hard disk of 8 GBs and I don't know what to do next . I need to do the same exact steps and I am not sure if compiling should be in
/usr/src
but if so I want to merge the extra space from the extra hard disk into this location . Is that possible ?

In other words , I need to connect the two hard disks .


More From » virtualization

 Answers
5

Format the new drive to ext4 with gparted or any tool you wish.



Then mount the partition at /mnt (or any location you choose)



sudo mount /dev/sbb1 /mnt
sudo chown your_user:your_user /mnt


Then put the kernel source in /mnt



mkdir /mnt/src
tar xjvf linux-source-2.6.22.tar.bz2 -C /mnt/src


Then proceed with your build.



Note: you should run make as follows, it will make the modules.



make -j5


You then use sudo to install



sudo make modules_install


FWIW there are a number of helper scripts, see



Ubuntu Wiki compile kernel



Obviously there are a number of considerations in building a custom kernel, good luck to you.



EDIT: To merge 2 hard drives, use LVM. You will not be able to do LVM as your original install is not to LVM, so mounting the new drive is the best option.


[#41391] Thursday, July 15, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ithriv

Total Points: 46
Total Questions: 115
Total Answers: 96

Location: Malaysia
Member since Wed, May 11, 2022
2 Years ago
ithriv questions
Tue, Mar 14, 23, 14:31, 1 Year ago
Wed, Oct 5, 22, 02:59, 2 Years ago
Fri, Mar 11, 22, 10:12, 2 Years ago
Thu, May 11, 23, 10:55, 1 Year ago
Sun, Sep 26, 21, 06:47, 3 Years ago
;