Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
possible to boot from a folder?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
bastibasti
Guru
Guru


Joined: 27 Nov 2006
Posts: 568

PostPosted: Tue Feb 07, 2017 2:52 pm    Post subject: possible to boot from a folder? Reply with quote

Hi,

is there any option to boot gentoo from a folder? for example I only have one partition for / and no space left... The I would copy a stage3 to /rescue-fs ... would it be possible to boot /dev/sda1/rescue-fs somehow?
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6228
Location: Room 101

PostPosted: Tue Feb 07, 2017 3:10 pm    Post subject: Re: possible to boot from a folder? Reply with quote

bastibasti wrote:
is there any option to boot gentoo from a folder? for example I only have one partition for / and no space left... The I would copy a stage3 to /rescue-fs ... would it be possible to boot /dev/sda1/rescue-fs somehow?

bastibasti ... no, but it is possible to have grub2 boot from an iso on that filesystem, eg:

Code:
menuentry "SystemRescueCD-x86 4.9.2" {
 search --no-floppy --set -f /systemrescuecd-x86-4.9.2.iso
 loopback loop /systemrescuecd-x86-4.9.2.iso
 linux (loop)/isolinux/rescuecd setkmap=us isoloop=systemrescuecd-x86-4.9.2.iso
 initrd (loop)/isolinux/initram.igz
}

... or alternately use an initramfs that provides a rescue environment.

best ... khay
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43178
Location: 56N 3W

PostPosted: Tue Feb 07, 2017 3:21 pm    Post subject: Reply with quote

bastibasti,

Maybe. With an initrd you can do anything a real root filesystem can do.
You would need to mount the filesystem containing the folder somewhere.
That somewhere would be inside the initrd, then you could chroot into it.

A pivot_root would probably fail as it would would allow the initrd to exit and your mount would vanish.

-- edit --

Seeing khayyams post,, you can loop mount any filesystem. An ISO would be read only.
You would be booting a file rather than a directory.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum