Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to create a portable VmImage of Ubuntu with mainline kernel
#1
A portable VmImage of ubuntu which is having mainline kernel and which can shared among different users
Reply
#2
Once you have Ubuntu installed in a vm, you need to build a kernel (from sources) the Ubuntu way.

Refer these guides:
https://www.howtoforge.com/kernel_compilation_ubuntu
https://help.ubuntu.com/community/Kernel/Compile
https://wiki.ubuntu.com/Kernel/BuildYourOwnKernel

And my live demo video:
https://www.youtube.com/watch?v=97sYhGa7yfE

My video is a combination of all these above links.
This is the way you build kernel in Ubuntu way the Ubuntu kernel.
- - - - - - - - - - - - - - - -
If you need mainline kernel (kernel.org), then replace this source with kernel.org kernel source. But via make menuconfig create the .config file first. Since you cannot borrow this file from current running Ubuntu kernel instance. Hope that is clear Smile

It is similar in case if you build in Debian too. Since Ubuntu is sort of Debian fork.
- - - - - - - - - - - - - - - -
and which can shared among different users
>> Sorry this I am unable to understand. Can you explain ?

Kiran
Reply
#3
(09-22-2016, 01:14 PM)kirankankipati Wrote: Once you have Ubuntu installed in a vm, you need to build a kernel (from sources) the Ubuntu way.

Refer these guides:
https://www.howtoforge.com/kernel_compilation_ubuntu
https://help.ubuntu.com/community/Kernel/Compile
https://wiki.ubuntu.com/Kernel/BuildYourOwnKernel

And my live demo video:
https://www.youtube.com/watch?v=97sYhGa7yfE

My video is a combination of all these above links.
This is the way you build kernel in Ubuntu way the Ubuntu kernel.
- - - - - - - - - - - - - - - -
If you need mainline kernel (kernel.org), then replace this source with kernel.org kernel source. But via make menuconfig create the .config file first. Since you cannot borrow this file from current running Ubuntu kernel instance. Hope that is clear Smile

It is similar in case if you build in Debian too. Since Ubuntu is sort of Debian fork.
- - - - - - - - - - - - - - - -
and which can shared among different users
>> Sorry this I am unable to understand. Can you explain ?

Kiran

After kernel compilation is done. I guess i have to export that image and run it in virtualbox of other machines or users. Right?
Reply
#4
Oh I got it. The .deb files are the binary files. These files you can install anywhere. Once you install, you can see them in grub and boot via grub the desired kernel. I suggest you for this part watch my video.

You need to increase the delay of grub so that it waits few seconds before a quick boot. These days Ubuntu is configured by default to skip grub boot options menu.

I hope you are asking about this.

Kiran

Here is my grub (modified config for the same)
Notice the # in lines:
#GRUB_HIDDEN_TIMEOUT=0
#GRUB_HIDDEN_TIMEOUT_QUIET=true
These are changes done by me.

Once you are done with these changes run $sudo update-grub
to apply changes.
--------------------------------------------------

kiran@desktop-i7-5820k:/code/SAFE/TOFFEE$ cat /etc/default/grub
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
# info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0
#GRUB_HIDDEN_TIMEOUT=0
#GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
kiran@desktop-i7-5820k:/code/SAFE/TOFFEE$
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)