How to re-install openSUSE from hard disk using the terminal

I’m running openSUSE 11.3 and screwed some things up so that I can’t install anything, including UNetbootin. So I decided to completely reinstall. I’m limited to using my hard drive as there’s no CD/DVD or floppy drives installed on the machine and BIOS does not support booting from USB.

I found these instructions - Install any Linux distro directly from hard disk without burning any DVD - Just Another Linux Lover Blog

From the terminal enter these commands

sudo mkdir /distro
sudo chmod whoami:whoami
cp MYLINUX.iso /distro/distro.iso

Now extract Linux_kernel & Ram_disk to /distro#

Open /boot/grub/menu.lst

#ADD NEW ENTRY#
title Install Linux
root (hdX,X)
kernel /distro/Linux_kernel
initrd /distro/Ram_disk

Reboot and select “Install Linux” from grub. Blog Widget by LinkWithin

Creating the folder “distro” on root was easy and went smoothly. I can’t seem to make the second ‘whoami’ command work, though. I copied-and-pasted “sudo chmod whoami:whoami” into the terminal. It asks me for the root password, I enter that and then get

chmod: missing operand after holly:holly' Try chmod --help’ for more information.

I didn’t see anyone reply in the comments of that page saying they had trouble with it, so I think I’m just being an idiot. One person did suggest adding \distro at the end on another page and it gets me

chmod: invalid mode: holly:holly' Try chmod --help’ for more information.

What am I doing wrong here?

As long as you put the iso and /distro on a separate partition that you will not format during the install like /home.
IMHO, it should work, I’ve used ISO Buster on the Windows side to put installation CD/DVDs on Windows drives.

You should use a network installation, which is why it exists, and you’d get the latest updates with the network install.
software.opensuse.org: Download openSUSE 11.3

My caveat about the iso install was whether you needed to mount the /distro/disto.iso first, some like, mount -o loop -t iso9660 /distro/distro.iso /MYLINUX
Post back whether it works without my caveat it would be nice to document an alternative worked.

Thanks

Tarapharazon - I don’t see any way of running the network install without mounting it…
So how do I mount it?

Maybe I’d better put it this way - as far as Linux shorthand goes, I have no idea what any of this means. I just need layman explanations.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Your problem is the sudo chmod whoami:whoami command, openSUSE uses
the users group by default, it do not create one group per user, to
install from hdd:

First make a directory (not in the / partition) with your user, then
mount the iso file (mount -t iso9660 isofile.iso /pathtomountpoint -o
loop) and then copy all the content to the directory of the step one

now, from the boot/<arquitectura>/loader directory of the DVD copi the
linux and initrd files to /boot/grub/install (mkdir the directory first)

edit your /boot/grub/menu.lst file and add the following


title Install openSUSE
root (hd0,0) #---> change this to fit your system
kernel /boot/install/linux
initrd /boot/install/initrd

now reboot and select Install openSUSE, it start the ncursed UI and you
have to select install from hard disk and select the directory where you
have copied the files, YaST won’t let you change that partition during
the install


VampirD

Microsoft Windows is like air conditioning
Stops working when you open a window.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.15 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/

iEYEARECAAYFAkzAh2cACgkQJQ+0ABWtaVnN+ACdHS+gMdAOM7szwjW15GZU7i/u
hI8An1etgR29VpwtMDgXNbgVx+y8vZaL
=6yNK
-----END PGP SIGNATURE-----

Please don’t do this on /home. This means the partition will be mounted during install, thus the installer/partitioner will not be able to create a mountpoint for that partition in /etc/fstab. It results in an error on mounting the partition where your homedirs live. If you ignore this, it results in a system where the folder /home resides on the “/” partition, your original /home will not be mounted after finishing the install procedure.

You should unpack the ISO (mount it, copy contents) to another partition than current “/” and “/home”. Then you should create a couple of lines in /boot/grub/menu.lst to create the 11.3 install disk as a boot option. You’d have to use Yast to add a mountpoint for the partition where the content of the ISO lives after install.

I did this a couple of years ago, don’t have any docs.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

VampirD wrote:
> Your problem is the sudo chmod whoami:whoami command, openSUSE uses
> the users group by default, it do not create one group per user, to
> install from hdd:

I miss one thing too, that command are completly bad, the command you
have to use is: chown whoami:users target_file


VampirD

Microsoft Windows is like air conditioning
Stops working when you open a window.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.15 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/

iEYEARECAAYFAkzAiW4ACgkQJQ+0ABWtaVkJqgCeIQa43mJfka9dPYz5JQMu2kAZ
+wkAoNRzs+eu5c+W0vfzjJps2eMhDweU
=pz/k
-----END PGP SIGNATURE-----

IIRC, network install is a choice when you boot the installation DVD or LiveCD. Just select network install from the choices.

SDB:Network installation - openSUSE

Thank you all for your replies! I haven’t checked this thread in a while as I managed to contact the guy (Doug) who wrote the initial instructions I posted. As VampirD noted, Doug also said that isudo chmod whoami:whoami should have been sudo chown whoami:whoami.

Doug and I emailed back and forth, he’s cleared up a few understanding issues for me. He’s gone on vacation for a while and can’t email for a few weeks though, and partitions in Linux still are a bit confusing to me. Here is what I have, can you tell me if this is okay?

I created the folder /distro. Inside it are copies of the distro.iso, linux (kernel), and initrd (ram disk).

The next step is to edit /boot/grub/menu.lst, correct?

It would be nice to provide us with an outline of your current partitions before you move forward.
Also, provide us with the planned partitioning if you intend to change the current partitions, ie, what does your system partitions look like now and how you expect it to look after installing OpenSuse.

My guess is from the terminal console you run YaST to start the installation.
The you’ll see screens should be terminal drawn not the nice looking GUIs.
You may need to use tabs to navigate the terminal screens and make selections.

What I have now -

fdisk -l

Disk /dev/sda: 203.9 GB, 203928109056 bytes
255 heads, 63 sectors/track, 24792 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x3a053a04

Device Boot Start End Blocks Id System
/dev/sda1 17958 24793 54902784 83 Linux
/dev/sda2 * 12858 17958 40967640 f W95 Ext’d (LBA)
Partition 2 does not end on cylinder boundary.
/dev/sda5 14231 14494 2105344 82 Linux swap / Solaris
/dev/sda6 14494 17105 20971520 83 Linux

What I would like to have after is just one partition for openSUSE. I don’t need anything else, and as this computer is so old, I’d rather just have it simple.

I don’t know how to do that - how do I run YaST to start the installation? I really need step by step directions as I don’t know how to do anything in Linux.

I think output from a a mount command would be helpful and the output from


cat /etc/fstab
## and  
ls -hal  /  
##  and 
ls -halR /distro 

I can’t tell which partition is / (root), /distro, /home

Ok as I understand you want
#1 just OpenSuSe 11.3 installed on your PC to hdd /dev/sda which has 203Gb?
#2 you have a valid image copy of OpenSuse 11.3 residing somewhere on your system in /distro?

Yes I think you need to make a backup copy of /boot/grub/menu.lst and then modify /boot/grub/menu.lst to point to the location of the kernel and initrd in /distro which should be on the partition that is not the / (root) partition. Then the next time you boot it will boot into the installation kernel and initrd

**I strongly suggest that you write and save your proposed changes to /boot/grub/menu.lst into a text file and post it in this thread for review before you actually make changes to anything. Same goes for the output results I request above. Hopefully, errors or concerns will be corrected.

I also want to mention that the original instructions you followed in your OP were for installing a copy of Linux on top of windows, ie, it would boot to windows than you run Linux as an application.
**