I just bought a new hdd to install windows 7 on it. after installing and using windows 7 for a while, i felt like going back to vista for a moment. ![]() How to Fix MBR in Windows XP and Vista. What is the MBR? MBR stands for Master Boot Record and it’s the first sector of your hard drive that basically tells the BIOS where to look for the operating system on your computer. If, for any reason, the MBR becomes damaged or corrupt, then the operating system will be unable to load. You will normally see error messages like: Error loading operating system. Missing operating system. Invalid partition table. These messages are definitely not fun, especially if you are not familiar with computers. Most people would automatically assume their computers are dead! However, that’s not true. Being in IT myself, these errors are actually preferably to other types of Windows errors. Why? Well, it’s actually fairly easy to fix the Master Boot Record in XP and Vista. All you have to do is load up the Recovery Console and run a simple command. All of your data, applications, settings, etc are still intact on the drive and once the MBR is fixed, the computer will load normally. So how can you repair your damaged MBR? Here are the steps to follow: 1. First, restart your computer with the Windows XP setup disk in the CD drive.
![]() If you don’t have your original disk, borrow one or download a ISO image from a torrent site. When prompted, boot from the CD drive by pressing any key. If Windows loads automatically, you will first have to enter the BIOS setup and change the order of the boot devices to start with the CD drive. Once the setup loads, you will see the option to press R to repair a Windows installation. Once the Recovery Console loads up, you will have to type in a number that corresponds to your Windows installation. This is normally just 1. Press Enter and then type in the Administrator password. Now at the prompt, type in fixmbr. Your damaged MBR will now be replaced with a new master boot record and your computer should now be able to boot properly. Note that you may also want to run the fixboot command to repair the boot sector with a new one. Also, make sure you only use these commands on a system with one operating system installed. If you have more than one operating system installed, fixmbr and fixboot could mess up everything. Fix MBR in Vista. In Vista, the procedure to fix the master boot record is a bit different. You have to start up Vista in the Recovery Environment and then run the bootrec command. Here’s how. 1. First, load up the Windows Vista disc in your drive and press any key to boot from the disc. Choose the language, time, currency, etc and click Next. Now click on Repair Your Computer. Choose the operating system to repair and click Next. When the System Recovery Options dialog comes up, choose the Command Prompt. Now type bootrec. Enter. This will rebuild the boot configuration data and hopefully fix your problem. You can also run the command with switches to fix just the master boot record (/fixmbr), the boot sector (/fixboot), or rebuild the entire BCD (/rebuildbcd). If you are still having trouble with loading Windows, post a comment and I’ll see if I can help! Cent. OS6. 5安装和配置Cobbler 2. Cent. OS6. 5,最小化安装,分区的时候,自己需要调整。. FQDN名字,这是习惯,不是必须。http: //www. IP。 我的eth. 0是内网,eth. NAT功能。/etc/sysconfig/network- scripts/ifcfg- eth. BOOTPROTO=static. IPADDR=1. 72. 2. 8. NETMASK=2. 55. 2. BOOTPROTO=static. IPADDR=1. 72. 3. 1. NETMASK=2. 55. 2. GATEWAY=1. 72. 3. DNS1=1. 14. 1. 14. DEFROUTE=yes安装Cobbler直接运行下面命令,把所有需要的包都装上yum - y install cman tftp- server cobbler cobbler- web pykickstart debmirror dnsmasq打开服务需要使用的端口,并且设置NATudp 6. Generated by iptables- save v. Fri Jan 1. 7 0. 8: 1. PREROUTING ACCEPT [1. POSTROUTING ACCEPT [0: 0]. OUTPUT ACCEPT [0: 0]. A POSTROUTING - s 1. MASQUERADE. # Completed on Fri Jan 1. Generated by iptables- save v. Fri Jan 1. 7 0. 8: 1. INPUT ACCEPT [0: 0]. FORWARD ACCEPT [0: 0]. OUTPUT ACCEPT [1. A INPUT - m state - -state RELATED,ESTABLISHED - j ACCEPT. A INPUT - p icmp - j ACCEPT. A INPUT - i lo - j ACCEPT. A INPUT - p tcp - m state - -state NEW - m tcp - -dport 2. ACCEPT. - A INPUT - p tcp - m state - -state NEW - m tcp - -dport 8. ACCEPT. - A INPUT - p tcp - m state - -state NEW - m tcp - -dport 4. ACCEPT. - A INPUT - p udp - m state - -state NEW - m udp - -dport 5. ACCEPT. - A INPUT - p tcp - m state - -state NEW - m tcp - -dport 1. ACCEPT. - A INPUT - p udp - m state - -state NEW - m udp - -dport 6. ACCEPT. - A INPUT - p udp - m state - -state NEW - m udp - -dport 6. ACCEPT. - A INPUT - p udp - m state - -state NEW - m udp - -dport 6. ACCEPT. - A INPUT - p udp - m state - -state NEW - m udp - -dport 1. ACCEPT. - A INPUT - p udp - m state - -state NEW - m udp - -dport 2. ACCEPT. - A INPUT - p tcp - m state - -state NEW - m tcp - -dport 2. ACCEPT. - A INPUT - j REJECT - -reject- with icmp- host- prohibited. A FORWARD - j REJECT - -reject- with icmp- host- prohibited. Completed on Fri Jan 1. IP转发echo 1 > /proc/sys/net/ipv. NAT可以上网。启动相关服务chkconfig httpd on. Cobblertftp服务和rsync服务sed - i '/disable/c\\tdisable\t\t\t= no' /etc/xinetd. Cobbler" cobbler设置debmirrorsed - i - e 's|@dists=.*|#@dists=|' /etc/debmirror. Cobbler generated configuration file for dnsmasq. Cobbler. 2. 4来说,有一个重要的功能,就是让你可以不需要手工去编辑setting配置文件,直接使用命令去修改,默认这个功能是不启用,你需要启用。cd /etc/cobbler/. F8. 6/UHC$Wvc. Ic. X2t. 6cr. Bz. 2on. Wxyac. default_template_type : cheetah. EXAMPLE. COM. kernel_options : {'ksdevice': 'bootif', 'lang': ' ', 'text': '~'}. False, 'RUNKS': 1, 'ramdisk_size': 4. DC=example,DC=com. H. replicate_rsync_options : - avz. H. reposync_flags : - l - n - d. TFTP服务器 IP地址cobbler setting edit - -name=next_server - -value=1. Az. JZEl. 9uun. Sa. The. 9o. M0修改配置这个地方不能用命令修改,应该是bug#default_password_crypted: $1$m. F8. 6/UHC$Wvc. Ic. X2t. 6cr. Bz. 2on. Wxyac. default_password_crypted: $1$random- p$9. Az. JZEl. 9uun. Sa. The. 9o. M0设置apache目录访问# cat /etc/httpd/conf. Location. Match "^/+$">. Options Indexes Follow. Sym. Links. Order allow,deny. Allow from all. < /Location. Match> 添加repocobbler repo add - -mirror=http: //mirrors. Centos. 6- UPDATES \. True). else. self. True) 这行是添加上去的。DVD1把centos 6. Cent. OS- 6. 5- x. DVD1. iso /mnt. cobbler import - -path=/mnt - -name=Cent. OS6. 5 - -arch=x. DVD2umount /mnt. mount - t auto - o loop /var/www/html/iso/Cent. OS- 6. 5- x. 86_6. DVD2. iso /mnt. cp - rf /mnt/Packages/ /var/www/cobbler/ks_mirror/Cent. OS6. 5- x. 86_6. 4/. Cent. OS6. 5- x. 86_6. Packages/TRANS. TBL'? Cent. OS6. 5- x. 86_6. Cent. OS6. 5- x. 86_6. Kickstart Metadata,你可以在profile或者在system里进行设置,我的例子里是如果你设置了diskcfg=cinder,就会产生一个2. G的分区,如果没设置就不创建。 # kickstart template for Fedora 8 and later. AMD6. 4, or Intel EM6. T. # System authorization information. System bootloader configuration. Partition clearing information. Use text mode install. Firewall configuration. Run the Setup Agent on first boot. System keyboard. # System language. Use network installation. If any cobbler repo definitions were referenced in the kickstart profile, include them here. Network information. SNIPPET('network_config'). Reboot after installation. SELinux configuration. Do not configure the X Window System. System timezone. timezone Asia/Chongqing. Install OS instead of upgrade. Clear the Master Boot Record. Allow anaconda to partition the system as needed. SNIPPET('log_ks_pre'). SNIPPET('kickstart_start'). SNIPPET('pre_install_network_config'). Enable installation monitoring. SNIPPET('pre_anamon'). Mem. Total | awk '{printf("%d",$2/1. SNIPPET('func_install_if_enabled'). SNIPPET('log_ks_post'). Start yum configuration. End yum configuration. SNIPPET('post_install_kernel_options'). SNIPPET('post_install_network_config'). SNIPPET('func_register_if_enabled'). SNIPPET('download_config_files'). SNIPPET('koan_environment'). SNIPPET('redhat_register'). SNIPPET('cobbler_register'). Enable post- install boot notification. SNIPPET('post_anamon'). Repo Setup ###. rm - f /etc/yum. Cent. OS*. yum - y install yum- plugin- priorities. Sync Time ###. chkconfig ntpd on. Use. DNS yes/Use. DNS no/" /etc/ssh/sshd_config. GSSAPIAuthentication yes$/GSSAPIAuthentication no/' /etc/ssh/sshd_config. Start final steps. SNIPPET('publickey_root_robin'). SNIPPET('kickstart_done'). End final steps. %end上面的ks文件,实现了一个公钥注入的功能,需要创建一个自己的snippet publickey_root_robin你替换成你自己的公钥就可以。# Install Robin's public key for root user. PUBLIC_KEY". ssh- rsa AAAAB3. Nza. C1yc. 2EAAAABIw. AAAQEAu. Eu. Vf. Lv. Gc. Faca. Rh. Mopt. Ixsz. 2q. KKZa. 5e. W/4. RBi. 5GYPETk. VFOPl. NAEG1. LJo. RBw. QYG1wu. YQUNGj+Qorozt/By/WNrk. A2. 7jq. 7IWJf. WKLTXg. F9i. 30. BYe. BXf. QOVEDaa. QT+i. 1u. N1. KTp. 4isfnr. Rxmw. FQC5. 3+3rn. Qe. Ee. La+GHSOekq. Whc. G7. URu. V9. 5sqb. Oxw. SBx. 0Yj. 5f. 2o. V0. 5Kz. Oh. YYRo. Nwtq. Lfz. Pod/Pl. Omut. 4/q. Qp. Xh. HJkxf. EJn. Epgb. TIu. O1. Wc. 5v. Ts/c. Mu. Pma. J7x. 6d. AX2vg. 84. Lk. Ry. X1d. Dzv. Q8n. D/t. Yp. FYn. Sjzrh. 72. N7t. Mm. 76. GAa. RHz. Mxg. 3u. NMGVk+w. XCBU/Ffm. 1v. E1. A5u. Q== root@node. EOF. Strict. Host. Key. Checking no. User. Known. Hosts. File /dev/null. EOFcobbler setting文件 cat /etc/cobbler/settings. Az. JZEl. 9uun. Sa. The. 9o. M0. default_template_type: cheetah. EXAMPLE. COM. kernel_options: {ksdevice: bootif, lang: ' ', text: null}. RUNKS: 1, ip: false, ramdisk_size: 4. DC=example,DC=com. H. replicate_rsync_options: - avz. H. reposync_flags: - l - n - d.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
November 2017
Categories |