LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware - Installation (https://www.linuxquestions.org/questions/slackware-installation-40/)
-   -   Problem partitioning a VirtualBox disk (https://www.linuxquestions.org/questions/slackware-installation-40/problem-partitioning-a-virtualbox-disk-4175539017/)

Haines 04-07-2015 12:28 PM

Problem partitioning a VirtualBox disk
 
I'm running virtualBox under Debian Wheezy and want to use it to install Slackware in it. The machine has two hard disks, but the booted one is /dev/sdb and this where I want to install Slackware.

In VM VirtualBox Manager I have a Slackware drive. I enabled PAE for my CPU. In the VM Storage Tree is Slackware.vdi drive and the disk is slackware-14.1-install-d1.iso. In the VM Manager Slackware is
initially displayed as Powered Off and so I click Start and it powers on. This seems to start a Slackware installation routine in a terminal. I boot the installation with boot: ENT. I log in with "root". It looks like I'm now working with: "scsi 3:0:0:0 CD/ROM VBOX..."

I'm told

- mdadm: no arrays found in config file or automacially
- Reading all physical volumes.
- This may take a while
- No volume groups found

Not sure of the implications of this, but I suspect it can be ignored. I'm next asked to provide a keyboard map. The problem arises when I next try to use cfdisk or fdisk to partition a virtual drive from the root@slackware:/# command prompt.

With cfdisk for /dev/sdb, but I get: "FATAL ERROR: Cannot open disk drive". I try fdisk and get "fdisk.bin: unable to open /dev/sdb: no such file or directory". In a terminal I have no trouble dispaying the /dev/sdb partition table with cfdisk.

I assume this partition should be ext3, primary and bootable and perhaps 50 Gb. I assume that (given that this machine is only a sandbox in which I can play and I've got 16 Gb RAM in it) I don't really need to create a swap partition.

I'm told to use pkgtool to mount my partition(s) under /mnt. Pkgtool sounds like Slackware's package manager rather than a command such as mount. In any case, I have to create the Slackware partition
first.

273 04-07-2015 12:51 PM

Have you read the VirtualBox documentation and created a virtual disk for the install? When you created the virtual machine which operating system did you tell it to create one for?
VMs are great but they are different to dual-boot and the like and the concepts need a bit of thought. Apologies if you know that, in which case are you booting from the .iso or the CD or DVD image, how much space did you gove to the virtual drive and how much RAM did you give the VM?

Didier Spaier 04-07-2015 02:34 PM

In the virtual machine the virtual hard disk you prepared (aka Slackware.vdi) is known as /dev/sda, not /dev/sdb. Viewed from Debian, Slackware.vdi is just a file, not a disk.

Also, bear in mind that installed through VirtualBox Slackware will stay in this virtual hard disk and you will have to start VirtualBox first from Debian to start and use Slackware. Is that really what you want, or would you prefer a dual boot?

Haines 04-08-2015 12:21 PM

Thanks 273 and Didier. You have moved me past the hurdle.

In answer to informational questions, I told VirtualBox to install for Linux, Other. At this point I'm installing Slackware 14.1 installation disk 1 ISO. I gave it the default 8 Mb disk space and 512 Mb RAM.

When I run cfdisk on /dev/sda instead of the physical disk sdb, cfdisk operates correctly. I create a 1 Gb Linux (83) and 500 Mb swap (82) partition and write to disk. However, when I do:

root@slackware:/# mount -t vboxfs /dev/sda1 /mnt

I'm told vboxfs is an unrecognized file system. This is whether I have cfdisk define the partion type as Linux (83) or as VMWare VMFS (FB). But mount still returns the error. I found nothing in the manual that addresses the issue of what the file system should be.

273 04-08-2015 12:38 PM

The file system within the virtual machine is not virtual to the Slackware. Installer.
In essence, once you set up that virtual machine you follow the standard Slackware (or any other distro or OS) install procedure in the VirtualBox window. I think you still need to make that leap of understanding. Sorry if that sounds a little condescending as I don't mean it at all -- I know I misunderstood at first.

Didier Spaier 04-08-2015 12:48 PM

Why set the type as vboxfs while you did format /dev/sda1 as of type linux?

The right command would be just:
Code:

mount /dev/sda1 /mnt
But this will fail anyway because you did set the partition type but not yet (I guess) put a filesystem in it.

So just type "setup" and let the Slackware installer do all that for you. It will ask you which partition you want to use as installation "target" (and propose you /dev/sda1 that you will accept) then which filesystem you want (the default ext4 is good enough).

Also, I hope that you meant 8GB for /dev/sda1, not 8Mb. Anyway if you really want to use Slackware I suggest that you set it to at least 10 GB to be able to store your data and add third party software.

Finally, I suggest that you do some reading before installing, so go to SlackDocs now.

PS the mount command with vboxfs is for a shared folder, e.g. containing files in your Debian system that you would like to access from your Slackware system in the virtual machine. You will need to have completed the installation of Slackware in that virtual machine to be able to use this feature: do not do that from the installer, as it's just a tentative system that live in RAM till you reboot or shutdown the machine, then disappears.

And, from your installed Slackware system, you won't be mounting a partition (as is the case with an usual mount command) but somehow "remount" a Debian's folder in Slackware when using shared folders.

I hope I did shed some light, but else feel free to ask more questions.


All times are GMT -5. The time now is 01:45 PM.