Jump to content

Will Mandriva 2007 install on a USB HDD?


Guest n8oay
 Share

Recommended Posts

Guest n8oay

I have been trying various flavors of Linux over the last few months, and want to give 3 distros a more serious trial. Has anyone had any luck installing Mandriva One 2007 or Mandriva Free 2007 on a USB 2.0 hard drive? Any tips or how-to's?

Link to comment
Share on other sites

You -should- be able to do this simply by having the USB device plugged in when you boot the installer. You should see the USB drive in the partitioning portion of the install (but I have not personally tested this).

 

You'll likely need to install the bootloader onto the USB drive, and then have a BIOS that supports booting from a USB device so that you can start the OS. I do not know if you can have GRUB or LILO point to a USB device with it installed on an internal hard drive.

Link to comment
Share on other sites

  • 2 weeks later...

ive tried it before with no luck,

 

i wish i could rememebr what the exact issue with itwas, but its been a few months.

 

HOWEVER i do remember that it could have been related to the MBR/ file format?

 

sorry the details arent clear however for some information on a GREAT version of mandriva that WILL install to USB check out www.mandrivaclub.nl and look at mcnl

 

its a VERY stripped down version, but the scripts to do what you want have been included

Link to comment
Share on other sites

  • 2 weeks later...
Guest VictorRossetti
ive tried it before with no luck,

 

i wish i could rememebr what the exact issue with itwas, but its been a few months.

 

HOWEVER i do remember that it could have been related to the MBR/ file format?

 

sorry the details arent clear however for some information on a GREAT version of mandriva that WILL install to USB check out www.mandrivaclub.nl and look at mcnl

 

its a VERY stripped down version, but the scripts to do what you want have been included

 

mcnl is ok. But the issue of booting mandriva from an USB external drive starts from the initrd. the initial ramdisk mounted at boot, which loads the modules. It seems that the default initrd doesn't preloads usb and scsi emulation kernel modules, needed to boot the external drive. The computer does its job by booting the drive, but the kernel cannot mount the root partition because it doesn't have the modules ready. At this moment I'm experimenting with a new initrd. If I succeed I will give you all the info needed to. bye

 

Victor Rossetti, MD

Caracas , Venezuela

Link to comment
Share on other sites

You are going in the right direction. IIRC in the 2.4 kernels there were also timing issues requiring a rescanning of the scsi bus as well; don't know if that is still a problem with the 2.6 kernels. Here's a good, but somewhat dated article from IBM on booting linux from a usb or firewire drive:

 

http://www-128.ibm.com/developerworks/linu...lnxw02aFireBoot

Link to comment
Share on other sites

I like that quote in the IBM article: [hard drives] "are now very cheap (approximately 50 GBP per gig!)" :D And that less than three years ago...

 

I just tried installing 2007 Spring on an external USB hard drive, and so far haven't been successful. I used One, and told it to install itself to /dev/sda, which I was able to repartition with the "Custom partitions" option. So far so good, I selected a /, a /swap and a /home, and also an extra ext3 partition for general use and a little fat32 partition for legacy systems. Partitioning went well, installation seemed to go ok, and I selected a graphical grub on /dev/sda. I did think about skipping this step and just having an entry on my internal drive's boot configuration, but I wanted to be able to boot from this external drive on other machines too if possible, so I selected /dev/sda.

 

Anyway, I got as far as rebooting but it just froze on the grub screen, didn't even let me choose between linux and failsafe, just hung. So I tried the reinstall again, and this time selected a text lilo, also on /dev/sda. This time it didn't hang on boot, it let me select linux, tried to boot but only got so far before a kernel panic:

Unable to access resume device (/dev/sda5)
...
Mounting root filesystem /dev/root
... (retrying a few times with different options)
mount : error 6 mounting ext3
Switching to new root
...
switchroot : mount failed : 22
Initrd finished
Kernel panic - not syncing : Attempted to kill init!

I thought it a bit odd that it was trying to resume from /dev/sda5 because according to the MCC (on my already-installed system) that's the swap partition on the external drive. I'm presuming it put something there to continue the install process, like setting up users and passwords etc. I've no idea why it goes sda1 (/), sda5 (swap), sda6 (home), sda7 (backups), sda8 (legacy) or where sda2-4 are.

 

Confusingly, MCC (on my installed system) lists /dev/sda1 as type "vfat" and refuses to mount it, but I think this is because of my fstab entry for my USB stick which appears as /dev/sda1 when it's plugged in (which it isn't now). If I manually mount /dev/sda1 from the console then I can see the contents ok. And when I'm running One from the cd or booting from the external drive then it can't see my installed fstab so that can't affect things I guess.

 

So the upshot is that I can select the drive at boot, and it loads lilo ok from there, but then it fails to mount and panics. Maybe this is the same initrd problem you're talking about but I'm puzzled that something which is loaded from the external drive then can't see other things on the same external drive.

 

Any advice very welcome! :)

Link to comment
Share on other sites

Not sure if this is helpful to the discussion or not, but I just tried to install Debian on the same external drive (tragic, nothing better to do on a rainy holiday Thursday :) ), and got similar results. The install seemed to go fine, but on boot it says

Booting Debian GNU/Linux, kernel 2.6.18-4-686'
root (hd1,0)
Filesystem type unknown, partition type 0xde
Kernel /boot/vmlinuz-2.6.18-4-686 root=/dev/sda1 ro
Error 17 : Cannot mount selected partition

Press any key to continue...

and then it goes back to the grub menu.

 

Interestingly, Debian's grub menu includes an entry for Mandriva on my internal hard drive, but even selecting that doesn't work ("file not found"). So something's screwy. Booting Mandriva from my internal drive, I can mount the external drive as before and see all the root partition no problem.

Link to comment
Share on other sites

The problem is with your initrd as noted in the ibm article. You have to rebuild it with the necessary usb and scsi drivers in order to mount your root partition on the usb hard drive at boot time. Some distros seem to include these drivers in their standard initrd but most don't. If they do, you will be able to install and boot from the usb hard drive. There's no easy way around this; if you don't have the drivers in initrd to mount your root partition at boot time, you will get a kernel panic every time.

Note also in the ibm article they further discuss the timing issues and the need to rescan the scsi bus. That dealt with 2.4 kernels using devfs. It's not applicable to 2.6 kernels using udev, but there may be similar issues or not. You would have to rebuild your initrd and see if it worked to find out for sure.

Link to comment
Share on other sites

Mandriva should take care of all needed modules in the initrd, usually it does when you install to an external usb hard drive.

 

For me it looks like a problem of the sdX devices on your system.

 

When you try to boot from /dev/sda(x), and you installed the bootloader to /dev/sda, then:

 

* you must change your BIOS to boot from this device, that is from usb

* on your system no other sdX devices should confuse the set up. For example: if you have an internal sata disk, this would be the sda device, or if you have a card reader etc. When you are booting, sometimes it is a timing issue which sdX devices gets the first one.

 

Also, it depends on which bootloader config is read, the one on your internal hard disk or the external.

 

When you start the installation it is crucial that you are aware of all sdX devices, in particular when you are installing from the One Live version. (it is diffrent if you are installing from the DVD version). Also, on the live version it is important if you plug in the external disk after you have booted successfully or before you start the live cd.

Link to comment
Share on other sites

* you must change your BIOS to boot from this device, that is from usb

No, I didn't change my BIOS settings. When I boot, I can press F12 and I can choose to boot from my hard drive, from my CD drive, from a USB device, or some other options. If I don't press anything, it goes ahead and boots to my hard drive, where lilo is installed. So when I was trying to boot from my external USB hard drive, I just pressed F12 and selected the USB device. At that point it found grub (or lilo) on the external drive.

 

* on your system no other sdX devices should confuse the set up. For example: if you have an internal sata disk, this would be the sda device, or if you have a card reader etc. When you are booting, sometimes it is a timing issue which sdX devices gets the first one.
I was careful to avoid that kind of confusion. My internal hard drive is /dev/hdaX, I have no card readers or whatever, and I made sure that the only USB device plugged in throughout the whole process (from before boot of One to attempted boot of the external drive) was the external drive.

 

Also, it depends on which bootloader config is read, the one on your internal hard disk or the external.
When I boot from my internal drive, it uses the lilo.conf from my internal drive (including the windows partition). When I boot from the external drive, the options are completely different as it's definitely using the config stored there.

 

I also tried adding /dev/sda1 as an extra option to my internal lilo.conf, but that also fails with a similar error message.

Link to comment
Share on other sites

Ok, actually pressing F12 changes the boot sequence. And it does boot ok initially from usb.

 

Also, no other sdX devices. So no confusing :D

 

 

You could try to extract the created initrd and try to found out if all modules are included.

 

My experience is that the last two editions of MDV install fine on a USB drive and do include all driv ers in the initrd, but I did not use the One live cd. But then, you should not have a problem with debian, I guess.

 

Note also in the ibm article they further discuss the timing issues and the need to rescan the scsi bus.

 

On some PC's that is an issue, at least I've seen it the last years with MCNLive usb booting.

Can you try to boot from the external drive on a different computer?

Link to comment
Share on other sites

Ok, actually pressing F12 changes the boot sequence.
But only temporarily, it doesn't change the settings for the next boot.

 

I tried the same external drive on two other machines, one a desktop and the other another laptop (same make, different model). Both offer the USB device as a boot option, both find grub and load the choice of boot options, both fail to mount the /dev/sda1 partition and give the same error message as on my machine.

 

As to the suggestion to "extract the created initrd and try to found out if all modules are included.", I have absolutely no clue where to start trying that. I think that unless someone can say "yes I have installed 2007 Spring on to my external USB hard drive and it works", then it seems like it doesn't. At least, not when installing from One.

Link to comment
Share on other sites

As to the suggestion to "extract the created initrd and try to found out if all modules are included.", I have absolutely no clue where to start trying that.

 

Copy the /boot/initrd-2.6.17-blah.img from your usb drive somewhere in a dir on your home/user dir.

 

It is a gzip compressed archive.

Right click on the file: extract ...

 

Then in a terminal:

 

cpio -i -d -H newc -F initrd-2.6.17-blah.img --no-absolute-filenames

 

You'll get two files: bootsplash and init and some directories, one called: /lib

---> here you find the included kernel modules

 

And the text file 'init' is also interesting :D

Edited by anna
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...