欧美三区_成人在线免费观看视频_欧美极品少妇xxxxⅹ免费视频_a级毛片免费播放_鲁一鲁中文字幕久久_亚洲一级特黄

Installing ZeroShell in Hard Disk ZT

系統 2026 0

Hello,

I have accomplished the following steps in order to install ZeroShell in my hard disk. At least it boots, but further probing is necessary.

Let suppose a free partition (e.g. /dev/hda5) of type ext2. We also have the LiveCD iso file (Zeroshell-1.0.beta3.iso). First, we mount this file in some folder:

# mkdir $HOME/zeroshell
# mount -t iso 9660 -o loop Zeroshell-1.0.beta3.iso $HOME/zeroshell

(Of course the mount command must be invoked from the folder that holds the .iso file. Otherwise its complete path must be provided)

Next we copy all the files to the target partition:

# mkdir /media/hda5
# mount -t auto /dev/hda5 /media/hda5
# cd $HOME/zeroshell
# cp -r * /media/hda5
# cd /media/hda5
# umount $HOME/zeroshell

In the 'isolinux' folder there are two compressed filesystem images: 'initrd.gz' and 'rootfs'. The last one contains most of the ZeroShell root file system and it is dumped to a ramdisk when working from the CD. In the next few steps this file system will be copy to the root folder of /dev/hda5:

(from /media/hda5)
# gunzip -c isolinux/rootfs > rootfs.unzip
# mkdir rootfsFolder
# mount -t auto -o loop rootfs.unzip rootfsFolder

Before copy it we need to remove some soft links that otherwise will be broken when booting from /dev/hda5

# cd rootfsFolder
# unlink sbin
# unlink usr
# unlink lib/modules
# ln -s /modules lib/modules

And we also have to modify the fstab table in /media/hda5/etc/fstab (use your favorite text editor). Be careful *not* to edit your host system fstab (which is found in /etc/fstab not in /media/hda5/etc/fstab). The /dev/hda5 must be mounted as root file system and we don't need to mount /cdrom (next you can see the new fstab):

# cat etc/fstab

/dev/hda5 / ext2 defaults 1 1
# /dev/cdrom /cdrom iso9660 ro 0 0
proc /proc proc defaults 0 0
none /sys sysfs defaults 0 0
devpts /dev/pts devpts gid=4,mode=620 0 0
shm /dev/shm tmpfs defaults 0 0

(Note that the cdrom entry is commented)

Now we can copy the contents of rootfsFolder to /media/hda5

# cp -r * ..

and unmount it.

# cd ..
# umount rootfsFolder

Note that 'rootfs.unzip' contain an image of every modification we have done, so if we need to use the original rootfs image we must use the compressed one in the 'isolinux' folder.

The initrd image does not supply device nodes for partitions in the hard disk. We need to modify it and add, at least, a device node for the target partition (/dev/hda5 in our example).

# gunzip -c isolinux/initrd.gz > initrd.unzip
# mkdir initrdFolder
# mount -t auto -o loop initrd.unzip intirdFolder
# cd initrdFolder
# mknod dev/hda5 b 3 5

Of course, we have to invoke mknod with the proper device name and major and minor numbers (see mknod man page and http://www.lanana.org/docs/device-list/ for more details. For partitions in the master device of the primary IDE -hda-, the major number is 3 and the minor one must equals the number of the partition -the number at the end of its name-).

We don't need the linuxrc script in initrd, so we modify it (use again your favorite text editor) like this:

# cat linuxrc

#!/bin/bash
#
# Modified from the original linuxrc (created by Fulvio Ricciardi 16-11-2003)
# 6-feb-2007
#
mount -t proc proc /proc

(I think it is not necessary to leave /proc to be mounted, anyway...)

Now the initrd filesystem must be unmounted and compressed again. For convenience we will put it on to the 'boot' folder, so we do with the kernel image:

# cd ..
# unmount initrdFolder
# gzip -c initrd.unzip > boot/initrd.gz
# cp isolinux/vmlinuz boot/vmlinuz

Now the system is ready! We only have to make it bootable by using our preferred boot loader. I use grub, so I added the following entries in the menu.lst file:

title ZeroShell
root (hd0,4)
kernel /boot/vmlinuz root=/dev/hda5 quiet init=/bin/init ramdisk_size=131072
initrd /boot/initrd.gz
boot

and ZeroShell boots from hard disk. Boot options are copied from the original isolinux.cfg. Further tests must be acomplished in order to ensure that everything works properly, but I hope this helps.

Thanks Fulvio for this wonderful system!

===============================================

Hello,

When I posted the installation proccess I had only booted it up and browsed the login page. When I finally tried to login into the system, it never ends the authentication process Embarassed .

I am really confused: the 'kerbynet' program (in /usr/local/apache2/cgi-bin), which is launched as a cgi script when the user press the login button, seems to start a never-end loop: it begins but it never ends (you can see it with a 'top' command from a shell prompt in the server.)

When the root file system is mounted from as a ram disk (default in the liveCD) kerbynet works without problems, so I have modified the "installation" method in a manner that the root file system still remains in a ram disk. It seems to work (at least kerbynet doesn't hang), but, again, further testing must be accomplished.

In order to install zeroshell in /dev/hda5:

# mkdir $HOME/zeroshell
# mount -t iso 9660 -o loop Zeroshell-1.0.beta3.iso $HOME/zeroshell
# mkdir /media/hda5
# mount -t auto /dev/hda5 /media/hda5
# cd $HOME/zeroshell
# cp -r * /media/hda5
# cd /media/hda5
# umount $HOME/zeroshell

Now we modify the linuxrc script in initrd in order to link /dev/cdrom to /dev/hda5 instead of to the actual CDROM device.

# mkdir initrdFolder
# gunzip -c isolinux/initrd.gz > initrd.unzip
# mount -t auto -o loop initrd.unzip initrdFolder
# cd initrdFolder
# cp linuxrc linuxrc.old
# cat > linuxrc << EOF

> #!/bin/bash
> #
> # linuxrc by Fulvio Ricciardi 16-11-2003
> # Modified by Fernando Gonzalez 7-2-2007
> mount -t proc proc /proc
> if mount -t auto /dev/hda5 /cdrom 2>/dev/null ; then
> echo Success
> echo -n "Loading root filesystem into RAM device... "
> if gzip -dc /cdrom/isolinux/rootfs >/dev/ram2 2>/dev/null ; then
> echo Success
> umount /cdrom
> /sbin/insmod /lib/loop.ko
> mount -o loop /dev/ram2 /cdrom
> cd /cdrom/dev
> ln -s hda5 cdrom
> cd /
> umount /cdrom
> else
> echo Fail
> umount /dev/hda5 > /dev/null
> fi
> else
> echo "Fail"
> fi
>
> EOF

# mknod dev/hda5 b 3 5
# cd ..
# umount initrdFolder
# cp isolinux/initrd.gz initrd.gz.old
# gzip -c initrd.unzip > isolinux/initrd.gz


(I am not sure if it is necessary or not to create the device node.)

And we change fstab in rootfs to mount /dev/cdrom as ext2 instead of iso9660:

# mkdir rootfsFolder
# gunzip -c isolinux/rootfs > rootfs.unzip
# mount -t auto -o loop rootfs.unzip rootfsFolder
# cd rootfsFolder
# cp etc/fstab etc/fstab.old
# cat > etc/fstab << EOF

> /dev/ram2 / ext2 defaults 1 1
> /dev/cdrom /cdrom ext2 ro 0 0
> proc /proc proc defaults 0 0
> none /sys sysfs defaults 0 0
> devpts /dev/pts devpts gid=4,mode=620 0 0
> shm /dev/shm tmpfs defaults 0 0
>
> EOF

# cd ..
# umount rootfsFolder
# cp isolinux/rootfs isolinux/rootfs.old
# gzip -c rootfs.unzip > isolinux/rootfs

Now the system is ready, only rest to make it bootable. With grub, append in /boot/grub/menu.lst

title ZeroShell
root (hd0,4)
kernel /isolinux/vmlinuz quiet root=/dev/ram2 ramdisk_size=131072 init=/bin/init
initrd /isolinux/initrd.gz
boot

-------------------------------------------------------

It must be improved: Although booting from hard disk, the whole root file system is mounted as a ram disk. I think it can be a problem if there is not enough memory installed.

I hope this can be helpful. Any idea about why kerbynet hangs when it the root file system is mounted from a partition in hard disk? Question

?

===================================================

Try to use cp -rp that preserves the permissions better than cp -r
Take in mind that the kerbynet cgi runs with the apache web server privileges. Hence the /etc/sudo program must have the setuid flag active.
Try if it works after you use the command chmod u+s /etc/sudo

Regards
Fulvio

?

======================================================

Thanks Fulvio,

It works well by changing the 'cp -r' in the first post:

**************************************************************
Now we can copy the contents of rootfsFolder to /media/hda5

# cp -r * ..

and unmount it.
**************************************************************

for 'cp -a' when copying the contents of rootfsFolder:

**************************************************************
Now we can copy the contents of rootfsFolder to /media/hda5

# cp -a * ..

and unmount it.
**************************************************************

Regards,

Fernando
==============================================

?

Thank you for your how-to. I'm at the end of it and i'm a little bit stuck. I have to make it bootable. You suggest to use grub. But ZeroShell doesn't install grub, does it? When i run shell prompt from ZeroShell console, i don't see /boot/grub/menu.lst.... I see directory /mnt/sdb1/boot/grub but there's no menu.lst. I created my own and added what you said to add but after reboot, there's 'No operating system installed'....

How to install grub loader from ZeroShell 'shellprompt'?
Thanx.

====================

Hello,

I'm sorry. I forgot to say that I was using a previously installed system (Ubuntu) as a "host" system so I have grub already installed. In order to "install" Zeroshell I booted Ubuntu and followed the steps.

It seems that you have done it from zeroshell 'shellprompt', and that you don't have any other OS in your disk. I suppose you have to obtain grub and install it following the instructions in http://www.gnu.org/software/grub/ I will try it...

========================

Yes, i used clean hard drive (without any OS).
After some time i was able to install ZeroShell (AFAIR there's grub-install somewhere in /usr or /var) but after all i had to switch to IPCOP because VPN available on ZeroShell is different than VPN on IPCOP and i didn't have much time to get know how to connect net-to-net VPN from ZS to Procurve router.
Anyway, ZeroShell is great (with http proxy and scanning for viruses by clamav it will be even more powerful).

Best regards.

============================

? thanks for this way that we can install zeroshell on HDD and change its FS ...
i did it step by step , my HDD part was sda3 instead of hda5 , so i modified some things , also regarding the files editing (CAT ..) i used text editor in ubuntu and replaced all the content with the lines you mention ..
then i tried to boot , a Kernel Panic error occurs :

Code:
kernel panic - not syncing : VFS : unable to mount root fs on unknown-block (1,2)

i dont know exactly what this error means ...
anyhow , is there is another way to make zeroshell FS editable ??? i just want to modify the user interface to add and remove some options ...
waiting for the professionals help


Installing ZeroShell in Hard Disk ZT


更多文章、技術交流、商務合作、聯系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號聯系: 360901061

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對您有幫助就好】

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長會非常 感謝您的哦!!!

發表我的評論
最新評論 總共0條評論
主站蜘蛛池模板: 国产欧美亚洲精品a | 国产五月色婷婷六月丁香视频 | 亚洲成人在线网 | 亚洲视频一区二区 | 成人毛片视频在线播放 | 欧美一级毛片在线看视频 | www.久久久.com | 色综合网亚洲精品久久久 | 亚洲欧美久久婷婷爱综合一区天堂 | 日韩在线 在线播放 | 久久伦理中文字幕 | yw在线播放 | 国产高清视频在线观看 | 国产三级做爰在线观看∵ | 国产一区二区三区日韩欧美 | 欧美国产视频 | 日韩成人中文字幕 | 男人的天堂在线视频 | 亚洲精品人成网在线播放影院 | 亚洲最大成人综合 | 国产精品久久av | 久久亚洲精品中文字幕二区 | 欧美成人免费全网站大片 | 欧美亚洲综合久久 | 日本女人下面毛茸茸 | 国产视频一区二区 | 色.com | 欧美一区二区三区免费视频 | 色婷婷影院 | 日本在线免费观看 | 操日日 | 欧美精品久久久久久久免费观看 | 亚洲欧洲在线视频 | 一本一本久久α久久精品66 | 亚洲一区二区免费看 | 五月色开心婷婷丁香在线 | 青草青草久热精品视频在线网站 | 亚洲综合色婷婷在线观看 | 欧美日本一 | 午夜精品在线视频 | 精品视频日本 |