Page 1 of 2

Is the SATA controller *supposed* to work? [RESOLVED]

Posted: 21. Jan 2011, 15:30
by DanielSmedegaardBuus
EDIT: This behavior is caused by a bug in Lucid and Maverick-based (except alpha 2) *buntus with the -virtual kernel. If you want to see it fixed, you might want to check out the link in the last post (http://forums.virtualbox.org/viewtopic. ... 15#p171976) and sign up as an affected person on launchpad. Save for that, if you need the SATA controller, installing the generic kernel will enable the controller (but leave you with a guest not optimized for being virtualized), or you can just use the usual approach and attach your virtual drive(s) to SCSI or SAS (IDE not recommended due to non-asynchronous I/O, and in my personal tests, SAS has had really bad transfer performance with SATA drives attached to an SII3114 adapter. SCSI has been the best option for me, but YMMV).
------------

Hey hey hey :)

Been virtualizing over the last couple of days, and in general, I'm overly thrilled with the new version 4 of VirtualBox.

There's just one standing issue that I'm having some trouble wrapping my head around, and that's the virtual SATA controller. It simply doesn't work. At least for my Linux guests.

I remember having this same exact problem with version 3. My virtual disk is attached to the virtual SATA controller, guest GRUB will load, but it will give up booting when waiting for the boot device.

The fix is easy, as stated numerous times elsewhere, just move the virtual disk to an IDE or SCSI controller, and off you go.

But the issue is not just with GRUB, nothing attached to the virtual SATA controller will show up in the guest (Linux) OS, not before VBox Guest Additions, not after. I've tried attaching a new virtual drive, a raw disk on my ICH10R controller, and a raw disk on an SII3114 PCI controller. No device appears in the guest.

I understand that the choice to no longer use the IDE controller for the boot drive on a newly created virtual machine is because asynchronous I/O is not possible with this controller, but why then default to the SATA controller, which apparently doesn't work properly with Linux guests, why not default to the SCSI one which works?

And, is this SATA controller even supposed to work? I mean, is this a bug, or a limitation?

I really don't mean to bitch, I'm just really confused :)

Daniel

Re: Is the SATA controller *supposed* to work?

Posted: 21. Jan 2011, 16:37
by Perryg
The SATA controller really does work.

If you originally install with IDE and then try to use SATA, some Linux guest will not be able to see the bootable sector as it will be listed as hda where sata lists it sda in grub. Manually changing these in single user or recovery mode will allow the guest to boot.

Also If the guest was installed using the SATA controller you should not see this issue.

Re: Is the SATA controller *supposed* to work?

Posted: 21. Jan 2011, 17:04
by DanielSmedegaardBuus
Perryg wrote:If you originally install with IDE and then try to use SATA, some Linux guest will not be able to see the bootable sector as it will be listed as hda where sata lists it sda in grub. Manually changing these in single user or recovery mode will allow the guest to boot.
Well, actually, it's been quite awhile since I've seen hdX devices in Linux, even IDE HDs appear as sdX devices. Besides, GRUB doesn't use those paths, it looks for the boot partition's UUID, which doesn't change when drives are moved around. That's why - in contrast to Windows - you can just move drives around without problem, so long as you have the MBR sector on the drive chosen by the BIOS to boot from.
Perryg wrote:Also If the guest was installed using the SATA controller you should not see this issue.
Well, not really, and that's also one of my points: The default setup when creating a Linux VM will attach the created .vdi on the SATA controller. You will be able to install Linux on this drive (which is interesting, actually, since the drive disappears afterwards...), but you will not be able to use it again until you move it to either an IDE or a SCSI controller.

Might it be that the kernel module to access this type of controller isn't registered for loading, nor added to the boot image? Does anyone know which module this virtual controller needs? It appears to not be part of the VBox Guest Additions, as I've compiled those (successfully), and there's still no donut when attaching anything to the SATA controller.

Re: Is the SATA controller *supposed* to work?

Posted: 21. Jan 2011, 17:53
by Perryg
I have every major Linux distro installed and some minor ones. (Linux and Windows hosts) I can assure you that they all work as expected in SATA. The Guest additions have nothing to do with the guests controller.

Re: Is the SATA controller *supposed* to work?

Posted: 21. Jan 2011, 18:04
by mpack
DanielSmedegaardBuus wrote:Besides, GRUB doesn't use those paths, it looks for the boot partition's UUID
On the contrary, I know for a fact that is not always true (or even IME typically true), otherwise lots of people would be having problems with cloned disks which are required by VBox to have new UUIDs. Yes indeed, some people do have a problem when the UUID changes, but surprisingly few people mention the issue.

Btw, the next time you contradict someone you might want to check their post count first, and compare it to your own!

Re: Is the SATA controller *supposed* to work?

Posted: 21. Jan 2011, 18:58
by Perryg
Daniel,
If you look at your boot.log or even in /dev you will see the block device is not a UUID. It is sda or hda
While Grub2 may identify the device with a UUID it does not actually mount the UUID it mounts the block device.

Re: Is the SATA controller *supposed* to work?

Posted: 21. Jan 2011, 19:05
by DanielSmedegaardBuus
Perryg wrote:I have every major Linux distro installed and some minor ones. (Linux and Windows hosts) I can assure you that they all work as expected in SATA. The Guest additions have nothing to do with the guests controller.
Interesting. I'm wondering if it's specific to the Ubuntus I've been trying, then. Are any of yours 10.04 LTS or 10.10?

Re: Is the SATA controller *supposed* to work?

Posted: 21. Jan 2011, 19:11
by Perryg
As I said I have every major OS in almost every version. So the answer would be yes.

I see that your profile says OSE and that your host is Windows. Is this true? Did you compile the source yourself?

Re: Is the SATA controller *supposed* to work?

Posted: 21. Jan 2011, 19:20
by DanielSmedegaardBuus
mpack wrote:
DanielSmedegaardBuus wrote:Besides, GRUB doesn't use those paths, it looks for the boot partition's UUID
On the contrary, I know for a fact that is not always true (or even IME typically true), otherwise lots of people would be having problems with cloned disks which are required by VBox to have new UUIDs. Yes indeed, some people do have a problem when the UUID changes, but surprisingly few people mention the issue.

Btw, the next time you contradict someone you might want to check their post count first, and compare it to your own!
I'm sorry if I don't adhere to your truth-telling rule by number of posts of the person talking. Must be some pretty boring discussions you have.

Reference the actual GRUB error output:

Gave up waiting for root device. Common problems:
- Boot args (cat /proc/cmdline)
- Check rootdelay= (did the system wait long enough?)
- Check root= (did the system wait for the right device?)
- Missing modules (cat /proc/modules; ls /dev)
ALERT! /dev/disk/by-uuid/18bd5f15-8012-4965-9254-aaf559297c77 does not exist.
Dropping to a shell!

Re: Is the SATA controller *supposed* to work?

Posted: 21. Jan 2011, 19:23
by DanielSmedegaardBuus
Perryg wrote:As I said I have every major OS in almost every version. So the answer would be yes.

I see that your profile says OSE and that your host is Windows. Is this true? Did you compile the source yourself?
Yes, that's correct. And no, this was from the downloadable installer at virtualbox.org. I had the same issue on my Mint 9 laptop last year.

There's also lots of other people experiencing exactly the same problem. This board has posts, google (even if the search is ambiguous) reveals more: http://www.google.dk/search?hl=en&q=vir ... =&aql=&oq=

Re: Is the SATA controller *supposed* to work?

Posted: 21. Jan 2011, 19:46
by Perryg
Daniel,
The only thing that concerns me at this moment in time, is that you are struggling with this, not the others that are having problems. I am sure that there are hundreds of people in any given moment in time that are having problems doing one thing or another.

So let's move forward shall we?

First you state that you are using Windows XP as the host. Can I assume that the hosts HDD is formated in NTFS? Or is it FAT or FAT32? This is really important so be certain.
  • (1) list the steps that you use to create the Ubuntu guest. All of them and do not leave out any that you actually use/did.
    (2) post the log file of that guest (as an attachment) so I can see what may be going on.
    (3) from the host command window type this VBoxManage showvminfo <VM Name> --details and post here. Replace <VM Name> with the actual name of the VM. Use "" if the name has a space in it.
You will need to run this from the directory that has VBoxManage.exe if you have not setup the environment variable.

Re: Is the SATA controller *supposed* to work?

Posted: 21. Jan 2011, 20:30
by DanielSmedegaardBuus
Perryg wrote:Daniel,
The only thing that concerns me at this moment in time, is that you are struggling with this, not the others that are having problems. I am sure that there are hundreds of people in any given moment in time that are having problems doing one thing or another.
Well, the others solved it the same way that I did. But I certainly agree that lots of people have lots of problems doing stuff :)
Perryg wrote:So let's move forward shall we?
Indeed :)
Perryg wrote:First you state that you are using Windows XP as the host. Can I assume that the hosts HDD is formated in NTFS? Or is it FAT or FAT32? This is really important so be certain.
Yes, NTFS, although I experienced the same thing on my Linux Mint laptop which is XFS, but for this debugging session, let's focus on what's at hand.
  • (1) list the steps that you use to create the Ubuntu guest. All of them and do not leave out any that you actually use/did.
    (2) post the log file of that guest (as an attachment) so I can see what may be going on.
    (3) from the host command window type this VBoxManage showvminfo <VM Name> --details and post here. Replace <VM Name> with the actual name of the VM. Use "" if the name has a space in it.
New > name: test > Operating System: Linux > Version: Ubuntu > Base Memory Size: 512MB > Create new hard disk > Dynamically expanding storage > Location: test, 8 GB > Finish
Settings > Storage > IDE Controller/CD-ROM > Attaching "ubuntu-10.10-server-i386.iso" > OK
Start > Next > Next > Finish > Installing Ubuntu in mode (f4): Install a minimal virtual machine > Choosing defaults/suggested values all the way, creating "daniel:daniel" as user:password > Reboot
VM crashes because PAE is not enabled > Settings > System > Processor > Check Enable PAE/NX > OK > Start
Boots from CD > I choose "Boot from first harddisk" > GRUB shows > hanging... > Get "Gave up waiting for root device", as shown before
I shut down machine > Settings > I remove the CD image > OK > Start > same thing...



C:\Program Files\Oracle\VirtualBox>VBoxManage showvminfo test --details
Name: test
Guest OS: Ubuntu
UUID: 33f8cb59-5df6-4c2d-875b-9b1c5f10cd86
Config file: E:\Machines\test\test.vbox
Snapshot folder: E:\Machines\test\Snapshots
Log folder: E:\Machines\test\Logs
Hardware UUID: 33f8cb59-5df6-4c2d-875b-9b1c5f10cd86
Memory size: 512MB
Page Fusion: off
VRAM size: 12MB
HPET: off
Chipset: piix3
Firmware: BIOS
Number of CPUs: 1
Synthetic Cpu: off
CPUID overrides: None
Boot menu mode: message and menu
Boot Device (1): Floppy
Boot Device (2): DVD
Boot Device (3): HardDisk
Boot Device (4): Not Assigned
ACPI: on
IOAPIC: off
PAE: on
Time offset: 0 ms
RTC: UTC
Hardw. virt.ext: on
Hardw. virt.ext exclusive: off
Nested Paging: on
Large Pages: on
VT-x VPID: on
State: running (since 2011-01-21T18:17:05.984000000)
Monitor count: 1
3D Acceleration: off
2D Video Acceleration: off
Teleporter Enabled: off
Teleporter Port: 0
Teleporter Address:
Teleporter Password:
Storage Controller Name (0): IDE Controller
Storage Controller Type (0): PIIX4
Storage Controller Instance Number (0): 0
Storage Controller Max Port Count (0): 2
Storage Controller Port Count (0): 2
Storage Controller Bootable (0): on
Storage Controller Name (1): SATA Controller
Storage Controller Type (1): IntelAhci
Storage Controller Instance Number (1): 0
Storage Controller Max Port Count (1): 30
Storage Controller Port Count (1): 1
Storage Controller Bootable (1): on
SATA Controller (0, 0): E:\Machines\test\test.vdi (UUID: f3d2d986-d47b-4a1c-bb89
-3edd327ec20d)
NIC 1: MAC: 080027458C93, Attachment: NAT, Cable connected: on, Trace:
off (file: none), Type: 82540EM, Reported speed: 0 Mbps, Boot priority: 0
NIC 1 Settings: MTU: 0, Socket( send: 64, receive: 64), TCP Window( send:64, re
ceive: 64)
NIC 2: disabled
NIC 3: disabled
NIC 4: disabled
NIC 5: disabled
NIC 6: disabled
NIC 7: disabled
NIC 8: disabled
Pointing Device: USB Tablet
Keyboard Device: PS/2 Keyboard
UART 1: disabled
UART 2: disabled
Audio: enabled (Driver: DSOUND, Controller: AC97)
Clipboard Mode: Bidirectional
Video mode: 640x480x32
VRDE: disabled
USB: enabled

USB Device Filters:

<none>

Available remote USB devices:

<none>

Currently Attached USB Devices:

<none>

Shared folders: <none>

VRDE Connection: not active
Clients so far: 0

Guest:

OS type: Ubuntu
Additions run level: 0
Configured memory balloon size: 0 MB




For reference, I'm uploading the machine to rapishare as we speak, will report the link in a couple of minutes. The VBox.log file was locked (the system being windows), so it's missing from the .7z archive. I'm attaching it directly here instead.

Cheers,
Daniel :)

Re: Is the SATA controller *supposed* to work?

Posted: 21. Jan 2011, 20:32
by DanielSmedegaardBuus
Sorry if I sound slightly sarcastic at times, to be honest, I had you mistaken for that other guy :)

Re: Is the SATA controller *supposed* to work?

Posted: 21. Jan 2011, 20:37
by DanielSmedegaardBuus

Re: Is the SATA controller *supposed* to work?

Posted: 21. Jan 2011, 20:40
by Perryg
Boots from CD > I choose "Boot from first harddisk" > GRUB shows > hanging... > Get "Gave up waiting for root device", as shown before
And what happens if you remove the CD at this point instead of booting from the CD and let it boot direct from the HDD?