LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices


Reply
  Search this Thread
Old 04-09-2012, 11:58 AM   #1
EXcatog
LQ Newbie
 
Registered: Apr 2012
Posts: 2

Rep: Reputation: Disabled
Virtual to Bootable USB


Hey Folks, first post here.

I am looking to build up a really small distro of linux with all the tools and whatnot that I use, and then use that on a persistant bootable USB. I really wanted a basic distro to build off of so I selected SliTaz. I downloaded the .iso file, and fired it up with VirtualBox. I used the SliTaz utility it came with to install it down to my virtual hard disk. I then used tazpkg manager and did some compiling of my own to build it to my liking. I did this as a fun project to familiarize myself with Linux a bit more and for use at work. After building it up, I really wanted to boot this from my USB thumbdrive. I tried to be clever and am running into some issues haha.

So essentially what I did was fire up my virtual machine using a slax iso file, I passed-through a physical USB stick I use for storage, and did a gzipped DD of the (the virtual disk) /dev/hda device to my thumbstick. I then fired up my Arch distro on another machine, plugged in the thumbstick with my .dd.gz iso and my target thumbstick which was zero'd out. gunzipped the image, DD'd the image to the thumbstick and double checked it with an fdisk -l, all the partitions took, great! I then restarted my box and selected USB as the boot device, the SliTaz boot loader came up, AWESOME!

Then tragedy I got a kernel panic, and it happens consitently. It seems to be pretty common and the best I can figure it has something to do with grub.conf and the disk. Now my disk is SD* as it is a USB stick now. IS this the issue? I am pretty new to kernel/grub/booty/configurey type of issues. Alot of the stuff from google didn't seem to quite fit my scenario, as it is pretty unusual I am sure.

Anyways, any tips, ideas, thoughts, suggestions, etc, would be GREATLY appreciated! Thanks so much everyone!

EDIT - Can't forget the error!

Code:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
PID: 1 comm: swapper Not tainted 2.6.30.6-slitaz #1
Call Trace:
"Why you failed and can't understand type data"

Last edited by EXcatog; 04-09-2012 at 12:01 PM.
 
Old 04-09-2012, 12:01 PM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Slitaz comes already with a tool to achieve what you want, tazusb. Have a look at the man-page for more information.
 
Old 04-09-2012, 03:32 PM   #3
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,982

Rep: Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625
"a persistant bootable USB"

The problem with a persistant usb is that you can never change some of the files. You simply want to install slitaz to a usb just as if it were a normal hard drive. Be careful or use a tool (maybe like tazusb) or dd a usb/hybrid iso image to some flash drive.
 
Old 04-09-2012, 03:49 PM   #4
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Quote:
Originally Posted by jefro View Post
The problem with a persistant usb is that you can never change some of the files.
That is the advantage of the tazusb tool. Normally you just install Slitaz to your harddisk and customize it (or just start it from a CD/USB/network and customize it). Then you use tazusb to create a persistent install on the USB drive. This install will be loaded to RAM when booting and running from there. Since Slitaz is so small this works fine even on older machines. If you make changes to the running system you can easily use tazusb again to write the changes back to the USB drive. For files that you want to keep you can also use an extra partition on that USB drive that will be mounted to /home, so that you can have larger files that are not loaded into RAM.
 
Old 04-09-2012, 07:12 PM   #5
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,982

Rep: Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625
There may be more than one way to skin a cat. The OP is welcome to explore any method.

Generally persistent installs have a difficult time updating kernel's. This is why I believe the vm is failing. If you feel that the tazusb.exe is the way to go then I can say I might try it someday.

Why don't you just install it to the usb flash as a normal install?

Or use the Slitaz method? http://www.syslinux.org/wiki/index.p...HARD_DISK_MODE

http://www.slitaz.org/en/get/#stable


Now that I see the title of this post I wonder if we both aren't on the wrong track too. The more I read it I think we missed his issue.

Last edited by jefro; 04-09-2012 at 07:58 PM.
 
Old 04-16-2012, 09:45 AM   #6
EXcatog
LQ Newbie
 
Registered: Apr 2012
Posts: 2

Original Poster
Rep: Reputation: Disabled
Hey! Thanks everyone for the responses! I am doing this as a foray to just better understand *nix in general, forming up my own uses for it and making it portable and learning booting behaviors and procedures in the process. I have taken all of your suggestions, or will be rather, and to an extent. I am using the tazusb binary from the distro, to install Slitaz onto a USB storage device. I will then use Tazusb to write a rootfs.gz of my filesystem with all of it's compiled and installed programs I added to it, etc etc. I will then copy that rootfs.gz over the one that Slitaz puts on the target thumbdrive when you do the iso2usb install of Slitaz to a thumbdrive. I imagine this would work? Thanks for all the posts guys, sorry for the delay though! Work and life eat up alot of time for me!

Any other thoughts/suggestions are great! This might seem out of the norm and or not best practice or whatever to get what I want, but I just want to tinker around to better learn about all the different distros and flavors of *nix.

Always learning

TL;DR, I created a virtual machine using Slitaz, compiled and installed a bunch of binaries I use for work. Now am trying to get that virtual machine as is, including compiled data, settings, etc etc, persistent and bootable from a thumbdrive.

Last edited by EXcatog; 04-16-2012 at 11:37 AM.
 
Old 04-16-2012, 03:04 PM   #7
WizadNoNext
Member
 
Registered: Nov 2009
Posts: 140

Rep: Reputation: 9
EXcatog: Yes we did missed issue:
Quote:
Originally Posted by EXcatog
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
It means not less, not more then: I cannot find stated device. In this case it is very wrong. To my knowledge there is no device with major:minor 0:0. Whatever. You need to put FS UUID (File System Universal Unique ID) instead of hard-stated device.
So instead of
Code:
root=/dev/hda1
or something similar, you need to put FS UUID like
Code:
root=UUID=abcdef01-1234-5678-....
to /boot/brug/brub.cfg
You would get FS UUID with tools like tune2fs
Code:
tune2fs -l /dev/hda1 | UUID
if you are using different FileSystem, then ask somebody or RTFM about your FS.
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] If I dd copy a bootable usb drive to an iso will the iso be bootable? mgallatin Linux - Software 5 03-23-2011 04:46 PM
Linux on USB flash/HDD, bootable as well as virtual nayeem Linux - Newbie 3 12-02-2010 12:08 AM
Creating bootable CDROM from a bootable USB drive seaquesttr Linux - Desktop 2 08-01-2010 11:57 AM
Making a USB stick bootable from a bootable cdrom cwwilson721 Slackware 2 10-23-2009 09:18 PM
bootable knoppix/windows virtual cd? trees Linux - General 2 01-29-2004 07:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud

All times are GMT -5. The time now is 10:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration