LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 581|回复: 0

running suse from a usb disk

[复制链接]
发表于 2006-1-21 22:56:35 | 显示全部楼层 |阅读模式
摘自:http://www.irishblogs.ie/post/running-suse-10-from-a-usb-disk
内容如下:
As a bit of an experiment, I tried to get SuSE Linux 10 running from an external 20GB USB hard disk I had lying around. It took a bit of fooling about and googling, but it worked in the end. Follow these steps and it should work for you too.
Note: I installed the x86_64 version, but this procedure should be exactly the same for 32 bit versions.

To make things as simple as possible, you may want to delete all partitions on your USB disk before continuing. This way, the SuSE 10 installer will automatically default to installing on that disk and will set up the partitions for you automatically.
Boot from the SuSE 10 DVD/CD’s, and begin the installation procedure as normal.

Ensure that SuSE is installing to a partition on /dev/sda — in my case /dev/sda2. /dev/sda1 is the swap partition.. If you have more than 1 USB disk, or possibly an SATA disk (I don’t have one so I can’t check this) the device name may differ… it will be /dev/sd[something].
Choose your packages and what not, let the install continue.
After files have been copied, the SuSE installer will reboot your machine. If you let it try to boot off the USB disk, it will fail, dumping you back to a $ prompt.
Boot from the DVD/CD again, and choose Installation (NOT rescue system!).
The installer will start up again, will go through hardware detection and so forth. Once it is ready, click on Abort. This will abort the installation procedure and dump you back to a text-mode menu. Use this to boot the installed operating system.
This will continue the installation where it left off before the first reboot. Allow it to complete, and log in.
Open a terminal, and su to root — i.e. enter the command su and provide the root password you specified during installation when requested.
Edit the file /etc/sysconfig/kernel
Add the parameters usb-storage, usbcore, ehci-hcd and scsi-mod to the INITRD_MODULES line - this should be very near to the top of the file. Append them to whatever’s there already, as that is still required.
Save the file.
Now run the command mkinitrd -o /boot/initrd-2.6.13-15-default. If you have a different kernel version, you will need to replace 2.6.13-15-default with whatever your system uses. Have a look in /boot/ and you should see the correct name there. If you get any errors about dependencies from this, something is wrong.
Now edit the file /boot/grub/menu.lst
Go to the section that defines the normal menu item you would select to boot SuSE 10 (usually the one beginning with title SUSE LINUX 10.0, and edit the line initrd /boot/initrd to read initrd /boot/initrd-2.6.13-15-default (or whatever version you have, as mentioned above).
Save the file
Now reboot, and you should be able to boot from your USB disk. I would advise that you go and edit menu.lst again and set the default operating system to one that resides on one of your normal internal disks, as bad things will probably happen if grub tries to boot off the USB disk while its disconnected. This information was pieced together from a few different guides I found on Google for other distributions — Hope it works for you.

Comments are closed.
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表