Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Can't install debian from iso on hard drive

Ask for help with issues regarding the Installations of the Debian O/S.
Post Reply
Message
Author
jpearey
Posts: 10
Joined: 2018-03-03 14:18

Can't install debian from iso on hard drive

#1 Post by jpearey »

The debian installation guide claims this is possible, but it's just not working. I followed the instructions and added the following code to /etc/grub.d/40_custom:

Code: Select all

menuentry "Debian 9.3.0 Install ISO" {
    insmod part_msdos
    insmod ext2
    set root="(hd0,msdos2)"
    set isofile="/boot/iso/debian-9.3.0-64.iso"
    linux /boot/iso/vmlinuz findiso=$isofile priority=low vga=788 ---
    # following line works, but cant mount iso image using it
    #initrd /boot/iso/initrd.gz
    # following line gives kernel panic - unable to mount root!!
    initrd /boot/iso/boot.img.gz
}
I then use the update-grub command to add it to the grub config.

It boots from the iso image but then gives me a kernel panic and unable to mount root error!

Searching for a solution is proving very difficult as I get too many irrelevant results.

User avatar
acewiza
Posts: 357
Joined: 2013-05-28 12:38
Location: Out West

Re: Can't install debian from iso on hard drive

#2 Post by acewiza »

Why not put the .iso on optical media?
Nobody would ever ask questions If everyone possessed encyclopedic knowledge of the man pages.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: Can't install debian from iso on hard drive

#3 Post by Head_on_a_Stick »

Try:

Code: Select all

menuentry "Debian 9.3.0 Install ISO" {
    set root="(hd0,msdos2)"
    set isofile="/boot/iso/debian-9.3.0-64.iso"
    loopback loop "${root}/${isofile}"
    linux (loop)/install/vmlinuz priority=low vga=788 fromiso="${root}/${isofile}"
    initrd (loop)/install/initrd.gz
}
(Untested)

EDIT: the linked instructions actually advise extracting vmlinuz & initrd.img from the ISO but my method might work.
deadbang

jpearey
Posts: 10
Joined: 2018-03-03 14:18

Re: Can't install debian from iso on hard drive

#4 Post by jpearey »

acewiza wrote:Why not put the .iso on optical media?
I don't have an optical drive. Most recent laptops don't come with one. People don't really use dvds/cds any more.

jpearey
Posts: 10
Joined: 2018-03-03 14:18

Re: Can't install debian from iso on hard drive

#5 Post by jpearey »

Head_on_a_Stick wrote:Try:

Code: Select all

menuentry "Debian 9.3.0 Install ISO" {
    set root="(hd0,msdos2)"
    set isofile="/boot/iso/debian-9.3.0-64.iso"
    loopback loop "${root}/${isofile}"
    linux (loop)/install/vmlinuz priority=low vga=788 fromiso="${root}/${isofile}"
    initrd (loop)/install/initrd.gz
}
(Untested)

EDIT: the linked instructions actually advise extracting vmlinuz & initrd.img from the ISO but my method might work.
The problem with this is that the initrd.gz ramdisk on the iso is so limited that you can't mount an ext4 partition. That's why the debian instructions say to use hd-media/boot.img.gz (read my in-code comment).

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Can't install debian from iso on hard drive

#6 Post by GarryRicketson »

Postby jpearey » People don't really use dvds/cds any more.
I don't know about that, Which people ? Many of us still do use them.
I still use them all the time, and I have a usb portable optical drive, simply plug it into the usb, and use the optical drive, works great . I bought it especially for the purpose of making installations on laptops that do not have a optical drive, or the one they have is broken.

jpearey
Posts: 10
Joined: 2018-03-03 14:18

Re: Can't install debian from iso on hard drive

#7 Post by jpearey »

GarryRicketson wrote:
Postby jpearey » People don't really use dvds/cds any more.
I don't know about that, Which people ? Many of us still do use them.
I still use them all the time, and I have a usb portable optical drive, simply plug it into the usb, and use the optical drive, works great . I bought it especially for the purpose of making installations on laptops that do not have a optical drive, or the one they have is broken.
Yes, I'm sure there are people who still use them. Just as there are probably people who still use floppy disks and video cassettes. Most people do not though. It's 2018, laptops haven't been sold with optical drives (something you seem to acknowledge) for quite some time now. Most PC games and software don't come on optical media any more. I did not intend to start a debate on whether dvds are mostly dead. I suggest you start a separate thread...

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Can't install debian from iso on hard drive

#8 Post by GarryRicketson »

Postby jpearey » People don't really use dvds/cds any more.
Well, your the one that brought it up, and
by jpearey » It's 2018,
Thanks for telling me, I didn't realize that.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: Can't install debian from iso on hard drive

#9 Post by Head_on_a_Stick »

Where did you get vmlinuz from?

I can only find linux on the mirrors:

http://cdn-fastly.deb.debian.org/debian ... ler/amd64/

Are you using the initrd.gz from that link?

@Garry, that is off-topic.
deadbang

jpearey
Posts: 10
Joined: 2018-03-03 14:18

Re: Can't install debian from iso on hard drive

#10 Post by jpearey »

Head_on_a_Stick wrote:Where did you get vmlinuz from?

I can only find linux on the mirrors:

http://cdn-fastly.deb.debian.org/debian ... ler/amd64/

Are you using the initrd.gz from that link?
I got the files from http://cdn-fastly.deb.debian.org/debian ... /hd-media/

The link you posted is to the netinstall section, which is different from the main, full debian installation.

jpearey
Posts: 10
Joined: 2018-03-03 14:18

Re: Can't install debian from iso on hard drive

#11 Post by jpearey »

GarryRicketson wrote:
Well, your the one that brought it up, and
by jpearey » It's 2018,
Thanks for telling me, I didn't realize that.
Maybe go troll somewhere else?

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: Can't install debian from iso on hard drive

#12 Post by Head_on_a_Stick »

jpearey wrote:The link you posted is to the netinstall section, which is different from the main, full debian installation.
*sighs* oh yes, sorry, I was distracted.

Try this:

Code: Select all

menuentry "Debian 9.3.0 Install ISO" {
    insmod part_msdos
    insmod ext2
    set root="(hd0,msdos2)"
    set isofile="/boot/iso/debian-9.3.0-64.iso"
    linux /boot/iso/vmlinuz findiso="${root}/${isofile}" priority=low vga=788 ---
    initrd /boot/iso/initrd.gz
}
EDIT: still untested :mrgreen:
deadbang

lostfarmer
Posts: 19
Joined: 2016-05-07 01:13
Location: Idaho

Re: Can't install debian from iso on hard drive

#13 Post by lostfarmer »

[code] menuentry "Graphical Debian Installer" {
insmod iso9660
linux (hd0,gpt11)/deb-hdd/vmlinuz append ${loopback}
initrd (hd0,gpt11)/deb-hdd/initrd.gz
}
[/code]

(hd0,gpt11)/deb-hdd --my location for (vmlinuz/initrd) ,yours will be different.

Some reason vmlinuz/initrd will not mount my ext4 partitions so I put the debian.iso on a 3g ext2 partition.

Downloaded the vmlinuz/initrd from http://http.us.debian.org/debian/dists/ ... media/gtk/

Use it to install debian-live-9.2.0-amd64-cinnamon+nonfree.iso

Note: when I Preview this post the CODE tags are not working, so not know when I Submit.

added: the new vmlinuz.initd downloaded from site above will search all partitions for any ***.iso file and try to use it, you do not tell it where to look in the grub.cfg . It does find my Mint.iso.

andre@home
Posts: 398
Joined: 2011-10-02 08:00

Re: Can't install debian from iso on hard drive

#14 Post by andre@home »

I think the usb mode of installation is the most simple, not only in 2018 already quite some years ago.
1 link within 2 second s including typing origins from 2010 so 8 years ago as an example how to a bootalbe iso on an usb stick
https://www.pendrivelinux.com/put-mandr ... e-windows/

So 8 years ago ... ? In computers is quite long ago... so it is not a recent 2018 option...
So come on it is 2018.... well if you now would call that trolling....knowing that the usb boot option for Linux is older than 8 yrs.... :oops:

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Can't install debian from iso on hard drive

#15 Post by p.H »

jpearey wrote:It boots from the iso image
No it doesn't. It just boots the Linux image /boot/iso/vmlinuz.
jpearey wrote:but then gives me a kernel panic and unable to mount root error!
As expected. The file /boot/iso/boot.img.gz declared in the "initrd" line is not an initramfs image. It is a compressed disk image.
You must use the initrd.gz from hd-media. Also, it may have limited support for filesystems, but I am not sure about ext4.

IMO it is a real shame that the initramfs embedded in Debian installer ISO images still cannot use ISO files.

andre@home
Posts: 398
Joined: 2011-10-02 08:00

Re: Can't install debian from iso on hard drive

#16 Post by andre@home »

Never have problems when the iso's are put on an usb stick in the correct way...
Did not even consider another option after the change coming from a CD/DVD as installation source.
O yeh... I could have done it through my home network, present here since 1999.. (and still working ok..), but using a usb stick is so easy....

lostfarmer
Posts: 19
Joined: 2016-05-07 01:13
Location: Idaho

Re: Can't install debian from iso on hard drive

#17 Post by lostfarmer »

p.H wrote: You must use the initrd.gz from hd-media. Also, it may have limited support for filesystems, but I am not sure about ext4.
I must correct my prior post --I have 20 partitions and forgot how the partitions were formatted. The initrd.gz from my prior post link will mount to search for **iso files on fat32, ext2, ext4 , will not mount NTFS. Should mount ext3 but I do not have one to test.

When the iso file is found ,it will mount the partition and should continue with the normal install process.

If one has other linux.iso files it may try to mount/load them and fail, before finding the debian.iso file.

Post Reply