Install SuSE from USB drive
Hello Friends, I have an fairly Old computer and i want to install OpenSuse Linux on it. I don't have an internet connection on it nor an Optical Drive. I just have USB ports on it. Is there a way to install OpenSuse on this old box of mine using a USB drive? If yes, what all should will i need and how will i prepare for the installation? Any help for the process of Install SuSE from USB drive is appreciated... :biggrin:
Re: Install SuSE from USB drive
You should have stuffs:
- SuSE Linux DVD image for i386 or x86_64 architecture whichever you want to install, or a Start-CD-Image can be used. This is much smaller and will fit on (almost) any USB drive
- This modified version of mkbootdisk [add option -n to the line "for (`fsck.vfat -v $part 2>/dev/null`) {"]
- An usb key or USB hard drive
- Root access to already installed Linux, and ability to work in a console
- Syslinux installed (use YaST)
Get Started :
- Open a root xterm or terminal
- Plug in the USB drive. The drive should mount automatically - if you use KDE, you can find out which device name is used for the USB drive, by reading it from the window that opens automatically. The partition has a name such as "dev/sdb1". The disk is the device without the trailing digit, e.g., /dev/sdb. You can also use and look for a device that matches your USB drive.
- Check the partition as root type via: or, if you know the disk
Code:
fdisk -l /dev/<disk>
The output should have line like :
Code:
/dev/sdb1 * 1 3924 1004528 c W95 FAT32 (LBA)
Here "FAT32" indicates the filesystem. It could also be "FAT16" (or something else). If you see a star (as in the example above), then this means that the bootable flag is set. - If the bootable flag is not set (no star), it needs to be set as follows: (<disk> is the disk name, e.g. "sdb". It's not the partion name as "sdb1"). Then press "a", and enter the partition number (e.g. 1, if the partition is sdb1). Save the changes with "w". If the automount prevents the changes from being saved, you can temporarily disable automount using "rcdbus stop" as root.
- If the filesystem is not FAT32, it needs to be changed: Then press "t" (to change the partition type) and "c" (for FAT32). Save the changes with "w".
- Create the filesystem (beware, this erases all data on the USB drive). To do so you must first unmount the drive:
Code:
umount /dev/<partition>
mkfs.vfat -F 32 /dev/<partition>
(Here <partition> is the partition, for example "sdb1"). - Make sure that the USB drive is FAT32 formatted:
Code:
fsck.vfat /dev/<partition>
If this fails, fix the filesystem with
Code:
fsck.vfat -a /dev/<partition>
Copy files to the USB drive
- Choose a suitable mount point for the dvd (for example /mnt/dvd) and a mount point for the USB drive (for example /mnt/usb). Create the mount points with :
Code:
mkdir /mnt/dvd
mkdir /mnt/usb
- Mount the downloaded CD/DVD image (make sure you have loop-device support in your Linux - in openSUSE this is available by default):
Code:
mount dvd.iso /mnt/dvd -o loop
Also mount the USB drive:
Code:
mount /dev/sdb1 /mnt/usb
- Copy the downloaded CD/DVD data to the USB drive at the root of the drive
Code:
cp -R -L /mnt/dvd/* /mnt/usb/
- Unmount the USB drive (if not, the command mksusebootdisk will fail)
Make the USB drive bootable :
Make sure the script is executable:
chmod +x mksusebootdisk
Install syslinux if it isn't already:
zypper install syslinux
Run the script with arch set to 32 for i386, or 64 for x86_64. This should work for any architecture e.g. ppc, IA64.
./mksusebootdisk --arch --partition /dev/<partition> /mnt/dvd
This command works reasonably fast. It will fail if you forgot to unmount (using umount) the USB disk. It will also fail (and give a "not a FAT file system" error if you press crtl-c) if the drive has errors. To fix the errors, use
fsck.vfat -w -r /dev/<partition>
Installation
Boot
Make sure your USB-device is plugged in. Boot the PC. If everything goes well the SuSE boot menu will appear. Choose install.
Setup
During setup, the install media will not be automatically found. The setup will fall back to text-mode setup where you can choose the install media location.
Your media should be in Local hard drive and USB drive should be /dev/sda1 or similar. The setup will ask for the ISO file location on the selected drive. Type in the file path and name. Initial / is required, so if your image is at the root of the drive and has name of dvd.iso, you need to type: