Change window size on virtual box after installing debian Jesse - window

I installed Debian-jesse on Virtualbox. However, the max screen size is 1024 x 768. I have a larger monitor that can have a larger window size. Does anyone have any thoughts on how I can increase that? If I drag the window edge, a white band comes around the Debian window, but I can't use it. I installed dkms as suggested by other threads, but that doesn't fix it.

You need to have the contrib section in your apt sources in your jessie guest system. You might need to add contrib to the respective line in your /etc/apt/sources.list, like so
deb http://ftp.debian.org/debian/ jessie main contrib
Then, as root, run
apt update
apt install virtualbox-guest-x11
and reboot the guest system (restarting its X server may also suffice).
If you have manually configured your X server in the guest system, an idea would be to move /etc/X11/xorg.conf out of the way, if it exists. Or, more bluntly, to purge xserver-xorg, reinstall, and then reinstall the guest additions.

Related

Does VM Guest need a KVM labeled kernel?

Why do cloud images have KVM labeled kernel as Guest? It seems KVM is most relevant for the Host. Maybe they are optimized for the Host, but I'm having to use the generic Linux kernel to get Desktops to work. Am I missing any performance by doing so? If not, why do the Guests use the KVM labeled kernel then?
I'm going to self-answer what I found, but dont hesitate to add to it.
Installing the linux-generic kernel took about 1GB of disk space. It turns out the kvm kernel is only about 6mbs according to apt show linux-image-5.4.0-1049-kvm. So yes, I likely need all that extra stuff to run the Desktop graphic display.
I could share the kernel externally to the VM to save space, but would have to make sure the Host included it with updates. Looking into a way to include a different distro repo in updates.. (looks like kernels are in security repo like deb http://security.ubuntu.com/ubuntu/focal-security main restricted
), but need to add signature.
Bummer, there is no longer a kernel PPA. Probably for security reasons. The is a script in an answer here, but uses Python:
https://askubuntu.com/questions/47397/how-do-i-add-the-kernel-ppa
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5
You can add the public key with apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 40976EAF437D05B5 https://raspberrypi.stackexchange.com/questions/115827/updating-from-such-a-repository-cant-be-done-securely-raspberry-pi
However, get errors:
The following packages have unmet dependencies:
linux-image-generic : Depends: linux-firmware but it is not installable
Depends: intel-microcode but it is not going to be installed
Depends: amd64-microcode but it is not installable
Recommends: thermald but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
So it looks like either copy the initrd.img* file over from another OS (possibly inside an ISO or VM image), or install it in the Guest VM to keep it up to date. The former allows sharing between VMs, the latter does not, but can have automatic updates.
I dont see a place to download the initrd.img and vmlinuz files directly. Please correct me if Im wrong.

Unable to start a virtual machine on Virtualbox - Ubuntu 18.04 - infamous problem - no solution works

While trying to use Laravel's Homestead environment, I had to install vagrant and virtualbox.
I already had an older version of Virtualbox.
uninstalled it and installed a new one, then installed Vagrant.
While trying to start my virtual machine I've got a well known issue:
For the past 2 days I've tried EVERYTHING
I've tried
sudo /sbin/vboxconfig
which didn't work, So as suggested in a few posts, I've disabled secure boot from the BIOS.
It still didn't work.
I've tried every type of uninstalling with apt, apt-get and dpkg for everything that includes "virtualbox" in it's package name. Also purged, autoremove and autoclean everything possible.
I've checked the lists and seems like I'm all clean of virtualbox.
But when I'm installing it again directly from the VB website with an installer (version 6.1) it happens again and again.
Funny thing is that no matter how much I clean or purge, whenever I'm installing it again, all my virtual machines are still there. meaning there's still something I'm missing...
Please help. Thanks a LOT!
I've read just about everything about it including:
https://askubuntu.com/questions/1163267/virtual-box-works-no-longer-suspect-a-kernel-update-caused-this
http://mitreasorin.blogspot.com/2016/08/upgrade-virtualbox-rtr3initex-failed.html
https://forums.virtualbox.org/viewtopic.php?f=7&t=79035
Unable to start Vagrant VirtualBox on Ubuntu
https://askubuntu.com/questions/1163267/virtual-box-works-no-longer-suspect-a-kernel-update-caused-this
https://forums.linuxmint.com/viewtopic.php?t=292858 (for /sbin/vboxconfig that didn't work)
https://forum.manjaro.org/t/virtualbox-not-working-cant-rmmod-vboxdrv/86277
And a lot more. too many to mention, it's just about repeating the same things.

cannot mount usb partition - unknown file system exfat

I have a USB stick with important info that would not show up in Windows. I tried the Disk Management Utility, and the partition with the data shows up as "healthy", but no drive letter, and right-click menu options all grayed out (except 'delete'). I used another laptop, I used a Macbook, all to no avail.
On Ubuntu, it also would not show up. I tried manual mounting, which did not work, and on parted it the "File system" column is empty.
Using fdisk -l it shows as HPFS/NTFS/exFAT.
???
I thought to remove my question, but since it took me a while to find the answer, others may benefit:
sudo apt install exfat-fuse exfat-utils
Now I could mount it with exfat specified as file system (and anyway now Ubuntu also automatically mounted it).
uanble to mount exfat file system then needs to follow below steps
Open a terminal (Ctrl+Alt+T shortcut in Ubuntu).
sudo add-apt-repository universe
sudo apt update
sudo apt install exfat-fuse exfat-utils

How do I install a custom kernel on a google compute engine instance?

I would like to install a custom kernel image on a Google Compute Engine instance. I have an instance running with:
foo#instance-1:/boot/efi$ uname -a
Linux instance-1 4.10.0-22-generic #24-Ubuntu SMP Mon May 22 17:43:20 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
And I've built and installed my kernel image:
sudo dpkg -i linux-image-4.10.0-rc8.10.0-rc8_amd64.deb
It shows up in the grub configuration file, I've set the default grub menu item to correct number, and I've run
sudo update-grub
Yet, when I reboot, I get the same kernel I started with.
Google documentation on this seems to be non-existent. There is one spot that suggests I might have to create the image externally, install the kernel, and import it. However, I will need to do this a lot, so I'd rather just install new kernels the old fashioned way.
Turns out that in Google's stock Ubuntu image, there's a grub config file:
/etc/default/grub.d/50-cloudimg-settings.cfg
that overrides what's in
/etc/default/grub
Editing the first file got everything working.
Before attempting this, I assume you have a fallback option? Some way of falling back to your current state. This is important because it seems you may not have physical access to the system.
Please check what /boot/grub/grub.cfg shows as default kernel. It will be a section beginning with menuentry and under that, an entry starting with linux. If that points to /boot/<default-kernel> then that's what you need to update along with initrd entry so that both kernel image and initramfs point to your custom kernel.
Also, it's possible that boot order of kernel images is alphabetical so newer kernel images (later in alphabetical order) have preference over older ones. In that case if you can change kernel image's file name to be higher than default kernel image, and same for the corresponding initramfs and config files (they will all be similarly named) and then run update-grub that may be quicker way of booting into your custom kernel. You can find those files under /boot/.
What worked for me was going into /boot/ and removing the old images and then running sudo dpkg -i <new_image> and rebooting the system with sudo reboot

Vagrant stalling on boot

I am trying to get a virtual machine working with Vagrant. Everything seems to run fine and it begins to unpack/install all the needed files. But every single time it just stalls when I get to this point.
==> default: Setting up grub-pc (2.02~beta2-36ubuntu3.11) ...
Here is a screen shot of what is going on:
I shut down the virtual machine and booted it back up. I can ssh into it but nothing seems to work. By this I mean there is no psql, no SQLAlchemy. These, among other things, are supposed to be set up in the VM. It seems as if it halts before installing the necessary software.
I've tried vagrant destroy and reinstalling, downloading a new image in case that one was corrupt and I tried reinstalling Vagrant. I am running Vagrant 1.9.5
Looks like you're provisioning with shell commands. I'm guessing that there's some sort of install prompt that's coming up and demanding some sort of user interaction / response. Because vagrant's handling the provisioning behind the scenes, you can't respond to the prompt and the install is not continuing.
You should be able to fix the issue by editing your Vagrantfile. As a guess, it looks like grub-pc is causing the issue (there's actually a grub-pc command prompt in the image you shared). See if you can figure out which package is installing grub-pc. If you're lucky, the problem can be solved by piping in a yes along with the install command (which will automatically answer yes to all install questions). This looks something like yes | sudo apt-get install grub-pc. If grub-pc is being installed as part of another package, you'll need to do some educated guessing to figure out which package is installing it and adding the yes | apt-get pipe to that install line (or just add the pipe before every install line).
This being said, I ran into an issue when I was installing the Java SDK on vagrant, where Oracle was demanding I accept their terms of use before the install would complete and a yes pipe wouldn't solve the issue. I was able to fix it by searching the web for "silent java sdk install via command line". If you can figure out which package is causing the issue, and a yes pipe isn't enough, searching for how to "silently" install that package via command line should help.
UPDATE
As you can see in a comment on this answer
Unfortunately a yes pip didn't do the trick this time but a quick
search on how to "silently" install grub led me to this.
DEBIAN_FRONTEND=noninteractive apt-get -y -o
Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold"
upgrade . After editing my Vagrant file it worked perfectly

Resources