Cara Install Slackware In Vmware

VMware on Slackware Linux

Slackware Linux isn't officially *supported* by the folks at VMware - but it's not a big deal to get everything working... once you realize the only immediate bump in the road is with the install/setup scripts that come with VMware. I would also suggest 'forcing' the installation to compile the various VMware modules for your system.

I really like working with virtual machines and as such my choice of Hypervisor is VMWare Workstation or ESXi. I created a new Slackware VM and during installation of VMWare tools it failed. To fix this first failure make a new directory #mkdir /etc/pam.d and then re-run the VMware tools installer. Install of VMWare tools doesn't work without some fiddling. First of all, eject the virtual CD-ROM by (as root) typing: # eject. Now you can 'Install VMWare tools' in the ESXi management interface. This will simply 'insert' the CD with the software, because Slackware won't auto-run anything unless you've set that up. Jika kamu ingin menjalankan 2 sistem operasi dalam satu laptop atau komputer, maka kamu harus menggunakan aplikasi vmware workstation. Bagaimana caranya? Well, actually Perry asked how to install 'VMware' in another thread, but it was split into a separate one for being a different question. VMware-player only 'runs' virtual machines created on other computers. VMware-server is a free product you can use to create, run and share virtual machines on your network.

Slackware: 10: 05:35 PM SOLVED Installing Slackware via VMware player: spaghettios: Slackware - Installation: 5: 02:52 PM SOLVED slackware-current and vmware-player 3.1.3: thach.trung.ngoc: Slackware: 4: 03:56 PM: VMWare Player Install on Slackware 12.0: perry: Slackware: 23: 12:32 PM.

In a nutshell... the VMware installation script assumes 'System V' style startup directories, scripts, etc... and Slackware just doesn't come setup that way since it has adopted something closer to a BSD scenario.

BTW - If you happen to be running a 2.4.x kernel - do yourself a favor and grab a copy of VMware 2.0.4. You shouldn't have problems installing/compiling modules w/VMware 2.0.3 with kernels through 2.4.3... but you'd need to edit some of the modules source to compile with a 2.4.4 kernel or later (just grab the latest VMware release and save yourself some trouble ;-)

The Suggested Solution - Preparation

Cara

Let's just assume we'll temporarily create the 'missing' System V setup in /etc

You might want to do the following:

    cd /etc
    mkdir init.d
    for i in {0,1,2,3,4,5,6}; do mkdir rc$i.d; done

Since VMware will run suid root, you might want to limit program execution to a particular group of users (I created a 'vmware' group in /etc/group and added the desired users).

Running the installation

ok... let's assume you already downloaded the latest VMware .tar.gz archive and untarred & unzipped the distribution (creates a vmware-distrib directory wherever you did this).

(you need to be root to actually run the install)

    cd vmware-distrib
    ./vmware-install.pl

If you didn't create the directories as mentioned above... the install should blow-up on you... and you'll need to go back and create the directories as mentioned.

When it asks you for the location of your startup scripts... and mentions rc0.d to rc6.d... you want to tell it /etc is the directory - since that's where we just created the temporary directories.

So... run through the prompts, answer the questions according to your preferences, etc... until you get to the part where it asks you if you want to run vmware-config.pl. DO NOT choose to run this now - you need to start the script manually with arguments. The setup should quit after you decline to run vmware-config.pl

I choose to install the binaries in /usr/local/bin - so we want to run vmware-config.pl from /usr/local/bin now. This might run OK if /usr/local/bin happens to be in your PATH setting, but I just 'cd' to /usr/local/bin in case it matters.

    cd /usr/local/bin
    ./vmware-config.pl --compile

The extra --compile switch above forces vmware-config.pl to compile fresh modules for your system. If you forget the switch... it might appear that everything will work OK - modules are loaded without complaints, etc... but on *my* system, the pre-compiled modules segfault on startup and shutdown - and among other things... VMware isn't going to work.

(Just use the --compile switch to increase your chances for success)

Run through the remainder of the prompts, etc... until the script eventually finishes.

Back to Slackware reality

Once you are done running the install/config scripts - you probably want to make some minor changes to fit the Slackware/BSD scenario.

Copy the vmware script in /etc/init.d to /etc/rc.d/rc.vmware and make it executable.

    cp /etc/init.d/vmware /etc/rc.d/rc.vmware
    chmod +x /etc/rc.d/rc.vmware

Add a few lines to /etc/rc.d/rc.local to set up VMware when you boot the computer

(In /etc/rc.d/rc.local)

    if [ -x /etc/rc.d/rc.vmware ]; then
    /etc/rc.d/rc.vmware start
    fi

Now... you can go back and get rid of the temporary /etc/init.d, /etc/rc[0-6].d fixes.

    rm -rf /etc/init.d
    for i in {0,1,2,3,4,5,6}; do rm -rf /etc/rc$i.d; done

Final adjustments...

If you decided to go with the vmware group suggestion... you might want to make adjustments to restrict VMware execution to members of that group.

    chmod 550 /usr/local/bin/vmware
    chgrp vmware /usr/local/bin/vmware
    chmod u+s /usr/local/bin/vmware

I decided to set up a vmware directory in /usr/local and set similar permissions... before we actually run VMware for the first time.

    mkdir /usr/local/vmware
    chmod 770 /usr/local/vmware
    chgrp vmware /usr/local/vmware

Options for Guest Operating Systems under VMware...

When you fire up VMware for the first time, the VMware Configuration Wizard pops up... and you need to tell VMware a few things about your existing/planned setup for your guest operating system.

(The guest operating system is the operating system that will run in VMware, and the host operating system is Linux in this case)

If you currently have a dual-boot setup on your system, it is possible to boot your 'other' operating system with VMware. This works fine in my experience... and the only real adjustment to make is in setting up your video to use the VMware FIFO SVGA driver.

The machine I'm using right now is 100% Linux - so I'll explain the 'virtual' hard-drive setup now... and I'll plan on writing more when I go into work again ('real' dual-boot Win98/Linux machine there).

VMware Configuration Wizard... virtual hard-drive guest system

Just to be consistent with my own hints above... I'm no longer running as root... and I've reverted to a user account that is a member of the vmware group I created earlier. You might need to log out and log back in for the group membership to kick in...

    License Information

    The first time you run vmware (vmware &), you want to run the Configuration Wizard (File -> Wizard) to set up a guest operating system. You have a number of possible choices for guest operating systems on the Guest Operating System dialog - I'm going to run through Windows 98 setup... but I've also run FreeBSD in VMware without any trouble.

    I forget exactly when VMware prompts you for license information - but you'll need to get license file issued to you... if you don't already have one. You'll want to copy the license file to the .vmware directory off the home directory of the user that will be running VMware.

    Disk Type

    Next... you are prompted for the Virtual Machine Directory for your guest operating system. Again... I'm assuming that the members of my vmware group will be sharing any guest operating systems created in /usr/local/vmware - so the full path entered here is /usr/local/vmware/win98 (Each guest operating system will have its own directory under /usr/local/vmware)

    When you come to the Disk Type Setting dialog... New virtual disk is the appropriate choice since we don't have an existing Windows 98 installation on the hard-drive. If you're planning to boot from an existing Windows 98 installation on a dual-boot machine.... you would choose Existing physical disk here - but I'll run through that possibility later in the existing physical disk guest system discussion.

    Virtual Disk Size Setting... maximum entry here is 2047 megabytes on my machine with a 2.2.19 kernel - I'm not sure if this changes with newer kernels.

Keep going through CD-ROM choice, floppy...

    Networking

    For the Networking Setting dialog... I've tried Bridged networking and Bridged and host-only networking, but the choice that makes sense for me is just the Bridged networking. My Linux machine is already running Samba for another Windows machine on my network... so I just plan to access Samba file-shares and printers through the Network Neighborhood.

Last dialog... Done

    Installing the Guest OS

    Now you're ready to 'Power On' the new guest configuration you just created... but keep in mind that the virtual disk you created is not partitioned or formatted yet... so you'll actually want to insert a Windows boot disk in your floppy drive before you continue... and your Windows 98 CD.

    'Power On' the virtual machine with the Windows boot disk in the floppy drive... and run through your Windows 98 setup. This usually takes quite a bit longer than a typical Windows installation - so you might want to grab a book or something =)

    Eventually the Windows 98 installation finishes... and you're looking at Windows 98 running in VMware.

    Adding the VMware Tools

    First thing you want to do after Windows is installed - add the VMware Tools to the Windows installation.

    From the Settings menu on the VMware window... choose VMware Tools Install

    VMware puts the guest operating system in a special state to allow you to install the tools... and you'll find the VMware Tools setup program on the floppy drive in the virtual machine. Run the setup, install the tools, etc...

    The VMware Tools provide a few improvements to the guest operating system, but the most relevant fix is for your video setup...

    Quick summary... you want to configure your video to use the VMware FIFO SVGA driver (Change adapter, search for driver in specific location, and browse to the Win9x folder on the floppy drive)

    Getting your sound to work...

    Of course I assume you have your sound working under Linux before you try to do this...

    You need to set this up when you have your guest OS turned off (just start VMware... but don't actually boot the guest OS - or shutdown the guest OS if it's running)

    From the VMware menu... Settings -> Configuration Editor... and find the 'Sound' choice near the bottom of the left pane. You should have /dev/dsp in the Device box - you just need to click on the Install button... and verify that the Start Connected checkbox is selected.

    Getting your modem to work...

    Again... it would be useful to have your modem working under Linux - so you can say with confidence that you know which serial port and interrupt you are using when you add it to your guest OS.

    I have a modem group under Linux... with users that are allowed dial-up access, etc... and the permissions on the corresponding serial port for the modem are adjusted accordingly. On my machine... the modem is at COM2 (/dev/ttyS1 under Linux) - so the permissions on /dev/ttyS1 are root.modem 660. For VMware to access the modem under your guest OS, it is important that the user running VMware has the appropriate permissions under Linux to access the serial port where the modem is attached.

    So... while you are looking at the Configuration Editor for your guest OS, you want to add the device information under the Serial Ports section. On my system... I select COM2, change the Type setting to Device, fill in the Path information (/dev/ttyS1), and make sure the Start Connected checkbox is selected.

    Finally... after saving the configuration changes, I boot the guest OS... and run through the modem installation, and install the modem as normal (install the regular Windows drivers, etc... as if you were working in a regular Windows installation)

VMware Configuration Wizard... existing physical disk guest system

The installation for a 'real' physical disk is very similar to the 'virtual' disk setup - with a couple of exceptions.

You'll need to uninstall/remove your old video drivers... and configure the video to use the VMware FIFO SVGA driver as mentioned in the virtual disk installation notes above. Apply Windows knowledge here - if you're having trouble... ask a friend who knows for help.

The biggest difference for a 'real' physical disk installation lies in the fact that you need read/write access to some of the partitions where the existing guest OS is installed.

I have LILO installed on the MBR... and configured the MBR with read-only access. The remainder of the partitions will potentially involve adjustments of Linux permissions... or a bit of thought about which filesystems you really need to access in the virtual machine.

Worst case... you might get frustrated and decide that you just want to run VMware as root, but I don't see this as a solution. More than likely... you'll want to make some adjustments to your /etc/fstab and allow user mounting and read/write access to specific filesystems.

Unfortunately, VMware considers read/write access to a whole disk when you run through the configuration wizard to set up a configuration to use an existing physical disk. Please understand that you are creating potential security hazards if you grant read/write access to an entire physical disk (/dev/hda, etc...).

A best case scenario would probably be to have your Linux and Windows installations on separate physical disks... but if this can't be achieved, follow along with the previous warnings in mind ;-)

First of all... some adjustments to /etc/fstab would be helpful to allow regular users to mount the related partition(s).

    (On my machine - I make the following adjustments to /etc/fstab)

    /dev/hda1/win98vfatnoauto,user,exec00
    /dev/hda7/win-appsvfatnoauto,user,exec00

    Also... give vmware group read/write access to /dev/hda - since that is the physical disk containing the partitions. This looks a little strange... but VMware will complain if you don't have read/write access to /dev/hda

    chgrp vmware /dev/hda
    chmod 660 /dev/hda

Now we can start up VMware and run the Configuration Wizard...

    Guest Operating System - Windows 98

Cara Install Slackware In Vmware Di

Again... assuming you read the notes about the virtual disk setup before the existing physical disk discussion... we have a /usr/local/vmware directory with root.vmware, 770 permissions.

    Virtual Machine Directory - /usr/local/vmware/win98

    Disk Type Setting - Existing physical disk

    Rawdisk Permissions Setting

      I made the following choices (partitions not mentioned are configured with Read Only access).

      PartitionNo AccessRead OnlyRead WriteType
      /dev/hda0XMBR
      /dev/hda1XDOS 16-bit >=32M
      /dev/hda7XWin95 FAT32

    CD-ROM Device Setting - CD-ROM enabled

    Floppy Device Setting - Floppy enabled

    Networking Settting - Bridged networking

    Video Issues...

    Assuming you had your video configured correctly under Windows... before you ever started playing with VMware under Linux, you'll need to do some tinkering to make the Windows installation use the VMware FIFO SVGA driver.

    If you'd prefer to read the 'official' tips... you can jump to the related video troubleshooting hint at the VMware website at http://www.vmware.com/support/linux/troubleshooting/video_sound_ts_linux.html#svgainstall

    I'm going to summarize the troubleshooting tips here for my own reference...

      1. Remove all drivers for any previous display adapters - this might involve deleting related .inf, .vxd, or .dll files. If you don't know what you're doing here - please grab someone who knows better - I am not responsible for you blowing up your Windows installation.
      2. Reboot and let Windows detect a generic VGA display adapter (make it probe for new hardware)
      3. (Reboot again if Windows makes the suggestion)
      4. Install the VMware Tools (Settings -> VMware Tools Install)
      5. Change your display adapter and install the VMware FIFO SVGA driver
      6. (Reboot one more time)

    Networking...

      You will now have an AMD PCNet network card listed in the network adapters for your machine. I didn't bother removing my 'real' NIC... since it didn't seem to be causing any problems (and it's no longer listed with the network adapters on the system).

      Configure the 'new' network card as normal - it would probably be nice to use DHCP to grab a new IP for Windows if your network provides for this... but you might need to make other arrangements.

      At home... I can just assign the 'virtual' Windows installation a new unique IP - but this might be a problem if all the machines in your network have real IP's/machine names from a DNS standpoint.

    Sound...

    Similar to 'virtual' disk setup - you should just need to adjust the configuration to use /dev/dsp for sound on your system... and sound should be detected as Soundblaster 16/32 AWE compatible.

If you upgrade your kernel...

If you happen to upgrade the kernel on your system... you'll need to build new modules for things to work correctly again -

Best case... you'll just need to run 'vmware-config.pl --compile' - but if you find yourself in more trouble... you might want to keep reading for other tips.

Assuming you got rid of /etc/rc0-6.d and /etc/init.d after you were done with the install - you'll just need to restore a couple of things temporarily before you run vmware-config.pl --compile (again)

    cd /etc
    mkdir rc3.d
    mkdir rc6.d
    mkdir init.d

Now you need to copy /etc/rc.d/rc.vmware to /etc/init.d/vmware and make a couple of minor adjustments in the form of symlinks.

    cp /etc/rc.d/rc.vmware /etc/init.d/vmware
    ln -s /etc/init.d/vmware /etc/rc3.d/S90vmware
    ln -s /etc/init.d/vmware /etc/rc6.d/K65vmware

Cara Install Slackware In Vmware Download

The 'start' (S##vmware) and 'stop' (K##vmware) values above aren't really important... but the vmware-config.pl script still looks for /etc/init.d/vmware, /etc/rc3.d, and /etc/rc6.d when it tries to stop/start the vmnet and vmmon services.

Cara Install Slackware In Vmware Pro

So... you're ready to run vmware-config.pl --compile again -

I just 'cd' to /usr/local/bin and run it from there -

    cd /usr/local/bin
    ./vmware-config.pl --compile

You just need to run through the questions for Samba and dhcpd one more time... realizing that you don't need to change anything. The most important part of the vmware-config.pl script is just building the modules for your new kernel.

Finally... when you're done running the script - you can clean up the temporary directories in /etc

    rm -rf /etc/rc3.d
    rm -rf /etc/rc6.d

Before you get rid of /etc/init.d/vmware - I'm assuming that your system is consistent with the rest of the tips here... and you already had /etc/rc.d/rc.vmware in place from your initial install (and the short addition to /etc/rc.d/rc.local mentioned earlier)

You should probably just copy /etc/init.d/vmware to /etc/rc.d/rc.vmware - just in case they made any changes to the script.

Then... go ahead and get rid of /etc/init.d

    rm -rf /etc/init.d

I believe that the vmware-config.pl script reloads the vmnet and vmmon modules -

    jbyrne@speedy $ /sbin/lsmod | grep [v]m
    vmnet 16832 3
    vmmon 17744 0

but I've never bothered to check if all the other services get restarted too. If you don't know what I'm talking about here... doing something like -

    jbyrne@speedy $ ps -ef | grep [v]m
    root 167 1 0 Feb24 ? 00:00:00 /usr/local/bin/vmnet-bridge
    root 184 1 0 Feb24 ? 00:00:00 /usr/local/bin/vmnet-netifup
    root 194 1 0 Feb24 ? 00:00:00 /usr/local/bin/vmnet-dhcpd
    root 196 1 0 Feb24 ? 00:00:00 /usr/local/bin/vmware-nmbd
    root 198 1 0 Feb24 ? 00:00:00 /usr/local/bin/vmware-smbd

Anyway - depending on how you have your vmware installation configured - you might notice more or less services running. If you don't see any services running - running the script in /etc/rc.d/rc.vmware to stop/start all the vmware stuff again wouldn't be a bad idea.

    /etc/rc.d/rc.vmware stop

Now start up everything again...

    /etc/rc.d/rc.vmware start

(Remember the script is expecting 'start' and 'stop' parameters in a 'SysV' style... and we just named it 'rc.vmware' to be consistent with the other stuff in /etc/rc.d)

So... all of the modules *and* services should be loaded/restarted now

Last thing you might want to do...

    /sbin/depmod -a

to update the module dependencies in /lib/modules/<kernel #>/modules.dep

VMware with an XFS filesystem

If you happen to be using an XFS-capable kernel and an XFS filesystem - you'll probably notice a complaint related to filesystem locking when you try to start up VMware. The fix - just do what it suggests... and add the 'host.FSSupportLocking1 = 0x58465342' line to /etc/vmware/config (or wherever you happend to put the global configuration file) I'm not sure if the value above is constant... so just use the line it spits out on your system.

(Things should work fine the next time you start VMware... after you make the addition to the config file)