Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 5th August 2008, 12:07
satimis satimis is offline
Senior Member
Join Date: Oct 2006
Posts: 533
Thanks: 4
Thanked 2 Times in 2 Posts
Default Fail to create disk.img

Hi folks,

Ubuntu 8.04 server amd64 - host - headless (w/o X packages)
Ubuntu 6.06 server amd64 - guest - headless (w/o X packages)

Previously I ran;

# qemu-img create -f qcow2 disk.img 10G


# kvm -hda disk.img -cdrom /dev/scd0 -m 512 -boot d

to create a working disk.img. It works on the VM.

But I couldn't create direct on running;

# kvm -hda disk.img -cdrom /dev/scd0 -m 512 -boot d

must be in 2 steps.

Now I tried creating another disk.img but the above steps did not work.

# qemu-img create -f qcow2 ubuntu6.06_080805.img 10G
Formatting 'ubuntu6.06_080805.img', fmt=qcow2, size=10485760 kB

# kvm -hdb ubuntu6.06_080805.img -cdrom /dev/scd0 -m 512 -boot d -smp 2
     =======================|  DirectFB 1.0.1  |=======================
          (c) 2001-2007  The DirectFB Organization (directfb.org)
          (c) 2000-2004  Convergence (integrated media) GmbH

(*) DirectFB/Core: Single Application Core. (2008-04-08 15:15) 
(*) Direct/Memcpy: Using libc memcpy()
(!) Direct/Util: opening '/dev/fb0' and '/dev/fb/0' failed
    --> No such file or directory
(!) DirectFB/FBDev: Error opening framebuffer device!
(!) DirectFB/FBDev: Use 'fbdev' option or set FRAMEBUFFER environment variable.
(!) DirectFB/Core: Could not initialize 'system' core!
    --> Initialization error!
Could not initialize SDL - exiting

without "-smp 2" still the same.

I don't know what mistake I have committed. I didn't done anything on the host except running apt-get update/upgrade. Please advise.



I found the cause. It was iptables. After flushing all rules, the problem gone.

# kvm -hdb ubuntu6.06_080805.img -cdrom /dev/scd0 -m 512 -boot d -smp 2 -vnc :9

$ vncviewer

viewer popup and installation began. After finish it reboots.

However on Xterm-1
it popup ;-
kvm_run: failed entry, reason 65535
kvm_run returned -8

# kvm ubuntu6.06_080805.img -vnc :0

$ vncviewer

viewer starts displaying;
Booting the kernel
Alert! /dev/hdb1 does not exist. Dropping to a shell!

BusyBox v1.01 (Debian 1:1.01-4ubuntu3) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

/bin/sh: can't access tty: job control turned off
Any mistake committed? Please advice. TIA

Remark: AMD dual core CPU

$ cat /etc/rc.local

# Set the default policy to drop
iptables -P INPUT DROP

# Allow existing connections to continue
iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT

# Allow the server to talk to itself
iptables -A INPUT -i lo -j ACCEPT

# allow all VMware MUI HTTP connections in from anywhere
iptables -A INPUT -p tcp --dport 8222 -j ACCEPT

# allow all VMware MUI HTTPS connections in from anywhere
iptables -A INPUT -p tcp --dport 8333 -j ACCEPT

# allow all VMware Authorization Daemon connections in from anywhere
iptables -A INPUT -p tcp --dport 902 -j ACCEPT
iptables -A INPUT -p tcp --dport 443 -j ACCEPT
iptables -A INPUT -p tcp --dport 25 -j ACCEPT 
iptables -A INPUT -p tcp --dport 110 -j ACCEPT

# Allow ssh from workstation public IP
iptables -A INPUT -s -p tcp --dport 22 -j ACCEPT

# Allow ssh from workstation public IP
iptables -A INPUT -p icmp --icmp-type echo-request -j ACCEPT
iptables -A INPUT -j LOG


# Set the default policy to drop
#iptables -P OUTPUT DROP

# Allow existing connections to continue
iptables -A OUTPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A POSTROUTING -t nat -j MASQUERADE

# Allow the server to talk to itself
iptables -A OUTPUT -d -j ACCEPT

# Allow DNS requests out
iptables -A OUTPUT -p udp --dport 53 -j ACCEPT
iptables -A OUTPUT -p tcp --dport 53 -j ACCEPT
iptables -A OUTPUT -p icmp --icmp-type echo-request -j ACCEPT

What rule shall I add allowing X forwarding? Shall I do anything on hosts.allow and hosts.deny? TIA


Last edited by satimis; 5th August 2008 at 13:43.
Reply With Quote
Sponsored Links


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Squirrelmail - cannot create folders wapa17 HOWTO-Related Questions 1 5th June 2007 21:04
Chroot SSH + ISPConfig Norman Installation/Configuration 27 26th March 2007 04:40
Verify email setup meekish Installation/Configuration 28 27th October 2006 16:36
Chrooted SSH apps bkrausz Tips/Tricks/Mods 14 30th August 2006 00:32
Install stopped at: create clamav.tar.gz domino Installation/Configuration 2 16th August 2005 07:36

All times are GMT +2. The time now is 00:01.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.