QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 2876|回复: 6

希望前辈们能讲一下如何将Slax6以Real形式装入硬盘

[复制链接]
发表于 2009-10-27 03:40:13 | 显示全部楼层 |阅读模式
听说以前Slax5提供了装入硬盘的脚本,但在Slax6中取消了。
我晚上试着装入硬盘,就象其它的Linux一样,虽然也成功了,但不是很满意,智能化程度不高。
我是个新手,对Linux了解的不多,希望前辈们能提携一下。
谢谢了。

我说一下我的安装。
我在网上找到一个脚本,这是Slax6的Real安装脚本(脚本代码在2、3楼,这论坛有限制,不能在一个贴里字数太多),在安装完毕后,复制vmlinuz到安装分区的/boot目录下,然后再C盘根下的grub配置中添加了:
  1. title SLAX-5
  2.         root (hd0,9)
  3.         kernel /boot/vmlinuz  rw root=/dev/hda10
复制代码
实现了多重启动到硬盘上的Slax6,启动中有个错误提示,没注意到,手指头点的太快,一晃就过去了,只瞟了一眼说给我修正了。 最终启动到了命令行状态。

    slax6.1.2官方提供的版本安装到硬盘后占用936M,不算大。但占用CPU资源不小,我本本的风扇一直呼呼的吹啊,心疼死俺。同样MEPIS8也使用KDE,CPU就很安静,只要我不搞大动作,风扇基本上不吹。

[ 本帖最后由 蝌蚪 于 2009-10-27 03:50 编辑 ]
 楼主| 发表于 2009-10-27 03:41:29 | 显示全部楼层
Slax6安装脚本
  1. <!DOCTYPE UI><UI version="3.0" stdsetdef="1">
  2. <class>Form1</class>
  3. <widget class="Dialog">
  4.     <property name="name">
  5.         <cstring>Form1</cstring>
  6.     </property>
  7.     <property name="geometry">
  8.         <rect>
  9.             <x>0</x>
  10.             <y>0</y>
  11.             <width>380</width>
  12.             <height>380</height>
  13.         </rect>
  14.     </property>
  15.     <property name="caption">
  16.         <string>SLAX installer</string>
  17.     </property>
  18.     <property name="associations" stdset="0">
  19.         <stringlist>
  20.             <string></string>
  21.             <string>@StatusBar1.setText("Wait please, searching for SLAX CD...")

  22. @ComboBox1.insertItems(@exec('cat /proc/mounts |grep -v loop |grep "/mnt" |grep -v "/mnt/live" |grep -v "/mnt/_" |grep -v "/mnt/cdrom_" |cut -d " " -f 2 |grep -v "/proc" | egrep -v "^/dev|^/sys|^proc|^/\$"'),0)

  23. @ComboBox2.insertItems(@exec('fdisk -l |egrep -o "/dev/[a-z]+" | uniq'),0)

  24. @ComboBox3.insertItems(@exec('find /mnt/live/memory -maxdepth 2  -name livecd.sgn |xargs -r -n 1 dirname'),0)
  25. @ComboBox3.insertItems(@exec('find /mnt -maxdepth 2  -name livecd.sgn |xargs -r -n 1 dirname'),0)
  26. @ComboBox3.insertItems(@exec('find /boot -maxdepth 1  -name livecd.sgn |xargs -r -n 1 dirname'),0)

  27. @StatusBar1.setText("Select target and click Go...")
  28. @CloseButton1.setVisible(false)

  29. </string>
  30.             <string></string>
  31.         </stringlist>
  32.     </property>
  33.     <widget class="ComboBox">
  34.         <property name="name">
  35.             <cstring>ComboBox1</cstring>
  36.         </property>
  37.         <property name="geometry">
  38.             <rect>
  39.                 <x>181</x>
  40.                 <y>108</y>
  41.                 <width>188</width>
  42.                 <height>21</height>
  43.             </rect>
  44.         </property>
  45.         <property name="editable">
  46.             <bool>true</bool>
  47.         </property>
  48.         <property name="populationText">
  49.             <string></string>
  50.         </property>
  51.         <property name="associations" stdset="0">
  52.             <stringlist>
  53.                 <string>@widgetText</string>
  54.             </stringlist>
  55.         </property>
  56.     </widget>
  57.     <widget class="QLayoutWidget">
  58.         <property name="name">
  59.             <cstring>Layout14</cstring>
  60.         </property>
  61.         <property name="geometry">
  62.             <rect>
  63.                 <x>10</x>
  64.                 <y>70</y>
  65.                 <width>150</width>
  66.                 <height>100</height>
  67.             </rect>
  68.         </property>
  69.         <vbox>
  70.             <property name="name">
  71.                 <cstring>unnamed</cstring>
  72.             </property>
  73.             <property name="margin">
  74.                 <number>0</number>
  75.             </property>
  76.             <property name="spacing">
  77.                 <number>6</number>
  78.             </property>
  79.             <widget class="Label">
  80.                 <property name="name">
  81.                     <cstring>Label6_2</cstring>
  82.                 </property>
  83.                 <property name="text">
  84.                     <string>Source (SLAX CD):</string>
  85.                 </property>
  86.             </widget>
  87.             <widget class="Label">
  88.                 <property name="name">
  89.                     <cstring>Label2</cstring>
  90.                 </property>
  91.                 <property name="text">
  92.                     <string>Install SLAX to:</string>
  93.                 </property>
  94.                 <property name="associations" stdset="0">
  95.                     <stringlist>
  96.                         <string></string>
  97.                     </stringlist>
  98.                 </property>
  99.             </widget>
  100.             <widget class="Label">
  101.                 <property name="name">
  102.                     <cstring>Label6</cstring>
  103.                 </property>
  104.                 <property name="text">
  105.                     <string>Write MBR to:</string>
  106.                 </property>
  107.                 <property name="associations" stdset="0">
  108.                     <stringlist>
  109.                         <string></string>
  110.                     </stringlist>
  111.                 </property>
  112.             </widget>
  113.         </vbox>
  114.     </widget>
  115.     <widget class="ComboBox">
  116.         <property name="name">
  117.             <cstring>ComboBox2</cstring>
  118.         </property>
  119.         <property name="geometry">
  120.             <rect>
  121.                 <x>181</x>
  122.                 <y>140</y>
  123.                 <width>188</width>
  124.                 <height>21</height>
  125.             </rect>
  126.         </property>
  127.         <property name="editable">
  128.             <bool>true</bool>
  129.         </property>
  130.         <property name="associations" stdset="0">
  131.             <stringlist>
  132.                 <string>@widgetText</string>
  133.             </stringlist>
  134.         </property>
  135.     </widget>
复制代码
回复

使用道具 举报

 楼主| 发表于 2009-10-27 03:42:11 | 显示全部楼层
接上篇,脚本没写完
  1.     <widget class="ComboBox">
  2.         <property name="name">
  3.             <cstring>ComboBox3</cstring>
  4.         </property>
  5.         <property name="geometry">
  6.             <rect>
  7.                 <x>181</x>
  8.                 <y>76</y>
  9.                 <width>188</width>
  10.                 <height>21</height>
  11.             </rect>
  12.         </property>
  13.         <property name="editable">
  14.             <bool>true</bool>
  15.         </property>
  16.         <property name="associations" stdset="0">
  17.             <stringlist>
  18.                 <string>@widgetText</string>
  19.             </stringlist>
  20.         </property>
  21.     </widget>
  22.     <widget class="ButtonGroup">
  23.         <property name="name">
  24.             <cstring>ButtonGroup1</cstring>
  25.         </property>
  26.         <property name="geometry">
  27.             <rect>
  28.                 <x>10</x>
  29.                 <y>180</y>
  30.                 <width>360</width>
  31.                 <height>80</height>
  32.             </rect>
  33.         </property>
  34.         <property name="title">
  35.             <string>Installation method</string>
  36.         </property>
  37.         <widget class="RadioButton">
  38.             <property name="name">
  39.                 <cstring>RadioButton2</cstring>
  40.             </property>
  41.             <property name="geometry">
  42.                 <rect>
  43.                     <x>10</x>
  44.                     <y>20</y>
  45.                     <width>275</width>
  46.                     <height>19</height>
  47.                 </rect>
  48.             </property>
  49.             <property name="text">
  50.                 <string>Real (&amp;3500 MB required)</string>
  51.             </property>
  52.             <property name="checked">
  53.                 <bool>true</bool>
  54.             </property>
  55.             <property name="associations" stdset="0">
  56.                 <stringlist>
  57.                     <string>exit</string>
  58.                     <string>@forEach(dir, @exec(ls -1 / | egrep -v "^dev"  | egrep -v "^proc" | egrep -v "^mnt" | egrep -v "^boot"  | egrep -v "^sys"  | egrep -v "^tmp" ))
  59.   @ProgressBar1.setMaximum(@dir_count)
  60.   @StatusBar1.setText(copying /@dir ...)
  61.   @exec(cp --preserve=all -R /@dir @ComboBox1/)
  62.   @ProgressBar1.setText(@dir_index)
  63. @end

  64. @exec("mkdir -p @ComboBox1/{tmp,boot,mnt,dev,sys,proc}")
  65. @exec(cd @ComboBox1/ &amp;&amp; cat etc/fstab |egrep -o "/mnt/[a-z0-9]+" | cut -b 2- |xargs mkdir)

  66. @exec("device=$(cat /proc/mounts |grep @ComboBox1 |cut -d " " -f 1) &amp;&amp; echo "$device / auto defaults 1 1" &gt;@ComboBox1/etc/fstab &amp;&amp; cat /etc/fstab | grep -v $device &gt;&gt;@ComboBox1/etc/fstab")
  67. @exec("rm @ComboBox1/etc/mtab")

  68. @exec("cp @ComboBox3/boot/vmlinuz @ComboBox1/boot")
  69. @exec("cp --preserve -R /dev/null @ComboBox1/dev")
  70. @exec("cp --preserve -R /dev/console @ComboBox1/dev")
  71. @exec("mount -o bind /dev @ComboBox1/dev")
  72. @exec("mount -t proc proc @ComboBox1/proc")


  73. @exec(echo "
  74. boot = @ComboBox2
  75. prompt
  76. timeout = 20
  77. change-rules
  78. reset
  79. vga = normal
  80. image = /boot/vmlinuz
  81.   root = current
  82.   label = SLAX
  83.   read-only
  84. " &gt;@ComboBox1/etc/lilo.conf)

  85. @StatusBar1.setText("Synchronizing, wait please...")
  86. @exec("sync")

  87. @StatusBar1.setText("Installing boot loader LILO...")

  88. @exec("lilo -r @ComboBox1 -s /dev/null 2&gt;/var/log/slax-lilo-install.log")

  89. @exec("umount @ComboBox1/dev")
  90. @exec("umount @ComboBox1/proc")
  91. </string>
  92.                 </stringlist>
  93.             </property>
  94.         </widget>
  95.         <widget class="Label">
  96.             <property name="name">
  97.                 <cstring>Label5</cstring>
  98.             </property>
  99.             <property name="geometry">
  100.                 <rect>
  101.                     <x>30</x>
  102.                     <y>40</y>
  103.                     <width>275</width>
  104.                     <height>29</height>
  105.                 </rect>
  106.             </property>
  107.             <property name="text">
  108.                 <string>- Install SLAX like real Linux, decompressed
  109. - to harddisk in desktop computer</string>
  110.             </property>
  111.         </widget>
  112.     </widget>
  113.     <widget class="QLayoutWidget">
  114.         <property name="name">
  115.             <cstring>Layout12</cstring>
  116.         </property>
  117.         <property name="geometry">
  118.             <rect>
  119.                 <x>10</x>
  120.                 <y>270</y>
  121.                 <width>360</width>
  122.                 <height>63</height>
  123.             </rect>
  124.         </property>
  125.         <vbox>
  126.             <property name="name">
  127.                 <cstring>unnamed</cstring>
  128.             </property>
  129.             <property name="margin">
  130.                 <number>0</number>
  131.             </property>
  132.             <property name="spacing">
  133.                 <number>6</number>
  134.             </property>
  135.             <widget class="StatusBar">
  136.                 <property name="name">
  137.                     <cstring>StatusBar1</cstring>
  138.                 </property>
  139.                 <property name="associations" stdset="0">
  140.                     <stringlist>
  141.                         <string></string>
  142.                     </stringlist>
  143.                 </property>
  144.             </widget>
  145.             <widget class="ProgressBar">
  146.                 <property name="name">
  147.                     <cstring>ProgressBar1</cstring>
  148.                 </property>
  149.                 <property name="lineWidth">
  150.                     <number>1</number>
  151.                 </property>
  152.                 <property name="progress">
  153.                     <number>0</number>
  154.                 </property>
  155.                 <property name="associations" stdset="0">
  156.                     <stringlist>
  157.                         <string></string>
  158.                     </stringlist>
  159.                 </property>
  160.             </widget>
  161.         </vbox>
  162.     </widget>
  163.     <widget class="ExecButton">
  164.         <property name="name">
  165.             <cstring>ExecButton1</cstring>
  166.         </property>
  167.         <property name="enabled">
  168.             <bool>true</bool>
  169.         </property>
  170.         <property name="geometry">
  171.             <rect>
  172.                 <x>290</x>
  173.                 <y>340</y>
  174.                 <width>80</width>
  175.                 <height>29</height>
  176.             </rect>
  177.         </property>
  178.         <property name="text">
  179.             <string>&amp;Install</string>
  180.         </property>
  181.         <property name="populationText">
  182.             <string></string>
  183.         </property>
  184.         <property name="associations" stdset="0">
  185.             <stringlist>
  186.                 <string>
  187. @ExecButton1.setText("Wait...")
  188. @StatusBar1.setText("Counting all files, please wait...")
  189. @RadioButton2
  190. @StatusBar1.setText("All done! click Close button.")
  191. @ExecButton1.setVisible(false)
  192. @CloseButton1.setVisible(true)

  193. </string>
  194.             </stringlist>
  195.         </property>
  196.         <property name="blockGUI">
  197.             <enum>GUI</enum>
  198.         </property>
  199.     </widget>
  200.     <widget class="CloseButton">
  201.         <property name="name">
  202.             <cstring>CloseButton1</cstring>
  203.         </property>
  204.         <property name="geometry">
  205.             <rect>
  206.                 <x>290</x>
  207.                 <y>340</y>
  208.                 <width>80</width>
  209.                 <height>29</height>
  210.             </rect>
  211.         </property>
  212.         <property name="text">
  213.             <string>&amp;Close</string>
  214.         </property>
  215.     </widget>
  216.     <widget class="Label">
  217.         <property name="name">
  218.             <cstring>Label13</cstring>
  219.         </property>
  220.         <property name="geometry">
  221.             <rect>
  222.                 <x>40</x>
  223.                 <y>10</y>
  224.                 <width>360</width>
  225.                 <height>50</height>
  226.             </rect>
  227.         </property>
  228.         <property name="font">
  229.             <font>
  230.                 <pointsize>20</pointsize>
  231.                 <bold>1</bold>
  232.             </font>
  233.         </property>
  234.         <property name="text">
  235.             <string>SLAX Live Installer</string>
  236.         </property>
  237.     </widget>
  238. </widget>
  239. <tabstops>
  240.     <tabstop>ComboBox3</tabstop>
  241.     <tabstop>ComboBox1</tabstop>
  242.     <tabstop>ComboBox2</tabstop>
  243.     <tabstop>CloseButton1</tabstop>
  244.     <tabstop>ExecButton1</tabstop>
  245.     <tabstop>RadioButton2</tabstop>
  246. </tabstops>
  247. <layoutdefaults spacing="6" margin="11"/>
  248. </UI>
复制代码
回复

使用道具 举报

发表于 2009-10-27 14:14:59 | 显示全部楼层
顶一个,不错啊。。。
回复

使用道具 举报

 楼主| 发表于 2009-10-30 16:34:22 | 显示全部楼层
暂时放弃Slax,在自己没能力重编核心前,不搞它了。
这家伙,害的CPU风扇一直发飙不休息。
等俺继续学习一段时间,俺还会回来的。
回复

使用道具 举报

发表于 2009-11-11 02:03:16 | 显示全部楼层
原帖由 蝌蚪 于 2009-10-30 16:34 发表
暂时放弃Slax,在自己没能力重编核心前,不搞它了。
这家伙,害的CPU风扇一直发飙不休息。
等俺继续学习一段时间,俺还会回来的。


CPU风扇的问题,可能是你的本子主板的ACPI支持问题,我在编译内核时看到原内核配置,其中有几个ACPI的支持并没有选中。
如果要你只是添加更多的ACPI支持,其实重编译不难,到官网去下原对应版本的内核源码和自动脚本,重编译一下就行了。
回复

使用道具 举报

发表于 2010-5-13 03:59:21 | 显示全部楼层
乱写什么,脚本就两句话
slax直接复制到分区,就可以启动了,不过要安装过grub4dos
cp --preserve -R -v /{bin,dev,etc,home,lib,root,sbin,usr,var,opt} /mnt/sda2
mkdir /mnt/sda2/{boot,mnt,proc,sys,tmp}
想装哪个盘,就把sda2改成几
grub配置写:
root (hd0,4)
kernel /slax/vmlinuz root=/dev/sda2 autostart=xconf;startx
差不多就可以了
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-3-29 06:53 , Processed in 0.075457 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表