LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 02-19-2010, 08:39 PM   #1
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Rep: Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546
Moving Debian From a Virtual System to Physical


I have been learning Debian by using a virtual machine. After fine-tuning my installation procedure, I decided to copy that installation to my physical system. The hard drive already has another Linux based system installed. I plan to dual boot.

After copying files I updated fstab and menu.lst.

The partition scheme between the virtual and physical environments are similar, but the partitions are not mapped exactly the same.

Thus the Debian system on the physical hard drive fails to boot. I think the initrd created in the virtual machine is looking for the root file system on /dev/hda1 whereas on my physical drive the new location is /dev/sda7.

How can I rebuild the initrd on the physical system? Or how can I build an initrd in the virtual system that will function on the physical system.

I started to use the installation DVD in rescue mode, but I did not get too far.

Thanks again.
 
Old 02-19-2010, 09:06 PM   #2
Refractor
Member
 
Registered: Oct 2008
Location: Rousse, Bulgaria
Distribution: Debian
Posts: 91

Rep: Reputation: 25
It's just a suggestion, but can't you boot a Linux system and chroot to /dev/sda7's mountpoint and run something like mkinitrd ?
 
Old 02-19-2010, 09:45 PM   #3
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Original Poster
Rep: Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546
Quote:
It's just a suggestion, but can't you boot a Linux system and chroot to /dev/sda7's mountpoint and run something like mkinitrd ?
Seems like a good idea. Unfortunately, /, /usr, and /var are on separate partitions. So I can chroot to the Debian / partition (/dev/sda7) but I don't know how to get /usr (dev/sda6) and /var (/dev/sda5) into the chroot environment. Possibly I need to get /dev manually populated and then I probably can manually mount the other two partitions?
 
Old 02-19-2010, 10:28 PM   #4
j1alu
Member
 
Registered: Apr 2009
Distribution: debian gnu/linux
Posts: 798

Rep: Reputation: Disabled
try
mount -o bind /dev /media/sda7/dev
mount -t proc /proc /media/sda7/proc
mount -o bind /sys /media/sda7/sys
first, then mount /usr and /var and then chroot.
 
Old 02-20-2010, 06:04 PM   #5
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Original Poster
Rep: Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546
Problem Solved

Thank you much j1alu. Very clever!

Original problem solved.

The problem was the initrd. The cure was modifying /etc/initramfs-tools/conf.d/driver-policy and then running update-initramfs -u -k all -v.

When I installed Debian to my virtual machine I selected the option to created a targeted/limited initrd for my (virtual) system. That decision resulted in the driver-policy configuration file establishing how to create subsequent initrds. By modifying the file from dep to most, I then created a more robust initrd that allowed me to boot on the physical system.

Without digging into details, I am reasonably sure the problem was a lack of support for SATA drives, which the virtual machine does not have.

Perhaps the update-initramfs script should list the current settings before creating a new initrd so users are modestly reminded of the current configuration options. Regardless, problem solved and lessons learned.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Is This Machine Physical or Virtual? unixanalyst Linux - Hardware 5 10-11-2009 04:24 AM
Moving my OS from one physical drive to another? yitzle Linux - Software 11 02-02-2008 11:00 PM
from virtual to physical kidswipe Linux - General 5 06-11-2007 08:08 AM
Physical to Virtual procedure for Linux emperor_black Linux - Software 1 11-29-2006 04:19 PM
Mouse Stopped Moving on Debian System rjcmi Linux - Newbie 1 04-16-2004 11:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 01:16 AM.

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